Bug 1383723 - [GSS][RFE] provide option in glusterfind to display only files as well
Summary: [GSS][RFE] provide option in glusterfind to display only files as well
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat Storage
Component: glusterfind
Version: rhgs-3.1
Hardware: x86_64
OS: Linux
low
high
Target Milestone: ---
: RHGS 3.5.z Batch Update 3
Assignee: Shwetha K Acharya
QA Contact: Kshithij Iyer
URL:
Whiteboard:
Depends On: 1392347
Blocks: 1408949 RHGS-usability-bug-GSS 1662626
TreeView+ depends on / blocked
 
Reported: 2016-10-11 15:11 UTC by Cal Calhoun
Modified: 2024-03-25 14:57 UTC (History)
15 users (show)

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.
Clone Of:
: 1392347 1662626 (view as bug list)
Environment:
Last Closed: 2020-12-17 04:50:16 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:5603 0 None None None 2020-12-17 04:50:42 UTC

Description Cal Calhoun 2016-10-11 15:11:36 UTC
Description of problem:

  Output of glusterfind includes directories so passing that output to a backup program effectively ignores file lists.  Request an output option similar to 'find -type t' to only output filenames.

Version-Release number of selected component (if applicable):

  RHGS 3.1.3

How reproducible:

  Requested feature.

Comment 2 Milind Changire 2016-11-07 07:30:34 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.

Comment 13 Shwetha K Acharya 2019-01-05 02:56:53 UTC
REVIEW:https://review.gluster.org/#/c/glusterfs/+/21965/

Comment 18 Yaniv Kaul 2019-07-22 08:27:20 UTC
Can we get a PM ack and move forward with this to 3.5.1?

Comment 37 errata-xmlrpc 2020-12-17 04:50:16 UTC
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


Note You need to log in before you can comment on or make changes to this bug.