[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[patch #9754] find: new '-attr' predicate to test inode flags

From: Matt Whitlock
Subject: [patch #9754] find: new '-attr' predicate to test inode flags
Date: Wed, 30 Jan 2019 21:03:45 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.80 Safari/537.36


                 Summary: find: new '-attr' predicate to test inode flags
                 Project: findutils
            Submitted by: mwhitlock
            Submitted on: Thu 31 Jan 2019 02:03:43 AM UTC
                Category: find enhancement
                Priority: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: None
           Fixed Release: None



On my system, I frequently need to find files having (or lacking) a particular
file attribute. To date, I have implemented this with relatively gross
pipelines like the following:

$ find -type f -exec lsattr -- {} + |
  grep -a '^......d' |
  cut -d' ' -f2- |
  xargs -d'\n' -r -- <somecmd>

I have long wanted 'find' to have native support for testing file attributes,
a.k.a. inode flags, as the above pipeline could be simplified to:

$ find -type f -attr +d -exec <somecmd> {} +

To that end, I have implemented support in 'find' for exactly this. *Please
consider merging the attached patch.* It includes additions to the
documentation (man and texinfo) describing the new predicate.

I do not know how to update the translations files for the localizable strings
I altered, so I would appreciate some guidance in that area.


File Attachments:

Date: Thu 31 Jan 2019 02:03:43 AM UTC  Name:
0001-find-introduce-attr-predicate-to-test-inode-flags.patch  Size: 18KiB  
By: mwhitlock



Reply to this item at:


  Message sent via Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]