bugfindutils - Bugs: bug #58941, wishlist: Support for -xattr...

 
 

bug #58941: wishlist: Support for -xattr -xattrname

Submitter:  Kevin Locke <kevinoid>
Submitted:  Wed 12 Aug 2020 02:34:14 PM UTC
Votes: 101
 
Category:  find Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Originator Name:  Open/Closed:  Open
Release:  None Fixed Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 23 Apr 2023 12:20:42 AM UTC, comment #2: 

original submission:

> It would be great if find could support searching for files based on the presence/absence of extended attributes (xattrs).


Until this functionality is included in GNU find, you could use my "rawhide" program which can search by extended attributes (EA) (names and/or contents) and also by the contents of access control lists (ACL). It's available from https://raf.org/rawhide as well as https://codeberg.org/raforg/rawhide.

raf <raf>
Thu 13 Aug 2020 03:18:39 AM UTC, comment #1: 

As mentioned in a post to the bug-findutils mailing list, Morgan Weetman graciously made available his previous work implementing -xattr (and -cap for capabilities) in https://gitlab.com/mweetman/findutils .  This should make an excellent starting place for future work.  See Pavel Raiskup's feedback and Bernhard Voelker's feedback for remaining issues.

[Note: This is being added as a comment to the bug tracker for others who may find this issue there.]

Kevin Locke <kevinoid>
Wed 12 Aug 2020 02:34:14 PM UTC, original submission:  

It would be great if find could support searching for files based on the presence/absence of extended attributes (xattrs).

The only way I could find to do this currently is via -exec, as suggested in https://unix.stackexchange.com/q/162359 and https://unix.stackexchange.com/q/132795

For reference, OS X find supports xattr search with the tests:

-xattr
True if the file has any extended attributes.

-xattrname name
True if the file has an extended attribute with the specified name.

per https://opensource.apple.com/source/shell_cmds/shell_cmds-203/find/find.1.auto.html

Thanks for considering,
Kevin

Kevin Locke <kevinoid>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by calestyo (Voted in favor of this item)
  • -email is unavailable- added by raf (Posted a comment)
  • -email is unavailable- added by vt_alt (Voted in favor of this item)
  • -email is unavailable- added by rnhmjoj (xattrs support in find)
  • -email is unavailable- added by kevinoid (Submitted the item)
  •  

    There are 101 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-10-26 calestyo Carbon-Copy- Added calestyo
    2022-01-18 vt_alt Carbon-Copy- Added vt_alt
    2021-07-01 rnhmjoj Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code