Add a New Comment (Rich Markup)
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.
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.]
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
(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
There are 100 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.
Please enter the title of George Orwell's famous dystopian book (it's a date):
Follow 2 latest changes.
Copyright © 2023 Free Software Foundation, Inc. Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved. The Levitating, Meditating, Flute-playing Gnu logo is a GNU GPL'ed image provided by the Nevrax Design Team. Source Code
Powered by Savane 3.11