Bug 1383723
| Summary: | [GSS][RFE] provide option in glusterfind to display only files as well | |||
|---|---|---|---|---|
| Product: | [Red Hat Storage] Red Hat Gluster Storage | Reporter: | Cal Calhoun <ccalhoun> | |
| Component: | glusterfind | Assignee: | Shwetha K Acharya <sacharya> | |
| Status: | CLOSED ERRATA | QA Contact: | Kshithij Iyer <kiyer> | |
| Severity: | high | Docs Contact: | ||
| Priority: | low | |||
| Version: | rhgs-3.1 | CC: | apaladug, bkunal, dwalveka, kiyer, mchangir, musoni, pprakash, puebele, rhs-bugs, rkothiya, sacharya, saraut, sheggodu, storage-qa-internal, sunkumar | |
| Target Milestone: | --- | Keywords: | FutureFeature, Rebase, ZStream | |
| Target Release: | RHGS 3.5.z Batch Update 3 | |||
| Hardware: | x86_64 | |||
| OS: | Linux | |||
| Whiteboard: | ||||
| Fixed In Version: | glusterfs-6.0-38 | Doc Type: | Enhancement | |
| Doc Text: |
With this enhancement, an option "--type {f,d,both}: type: f, f-files only ; d, d-directories only ; by
default = both` is added in glusterfind commands. This option is to be used with the "--full" option.
Filter logic is added to selectively print the output based on the argument type.
|
Story Points: | --- | |
| Clone Of: | ||||
| : | 1392347 1662626 (view as bug list) | Environment: | ||
| Last Closed: | 2020-12-17 04:50:16 UTC | Type: | Bug | |
| Regression: | --- | Mount Type: | --- | |
| Documentation: | --- | CRM: | ||
| Verified Versions: | Category: | --- | ||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
| Cloudforms Team: | --- | Target Upstream Version: | ||
| Embargoed: | ||||
| Bug Depends On: | 1392347 | |||
| Bug Blocks: | 1408949, 1468976, 1662626 | |||
|
Description
Cal Calhoun
2016-10-11 15:11:36 UTC
Some post-processing could be added on glusterfind output outside of glusterfind to weed out directories. All "NEW ..." entries could be tested for the directory flag as:
while read line;
do
op=$(echo $line | cut -f 1 -d ' ')
if [ "$op" == "NEW" ]; then
name=$(echo $line | cut -f 2 -d ' ')
# if the name doesn't point to a directory, we'll keep it
if [ ! -d "$name" ]; then
echo $line
fi
else
echo $line
fi
done < glusterfind-output.txt
-----
Please note that the above script doesn't handle encoded paths in glusterfind output and needs appropriate handling if need be.
Can we get a PM ack and move forward with this to 3.5.1? Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (glusterfs bug fix and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2020:5603 |