Whamcloud - gitweb
LU-15743 utils: add --xattr option to lfs find 04/52804/11
authorThomas Bertschinger <bertschinger@lanl.gov>
Tue, 17 Oct 2023 20:32:33 +0000 (16:32 -0400)
committerOleg Drokin <green@whamcloud.com>
Fri, 23 Feb 2024 07:12:32 +0000 (07:12 +0000)
commit978ff35d39e3f640a2bfc766b97982012ce07a80
tree115f1c7dac608a481fd6def2e98427cd115a360d
parent59b718d2203ecf800600f257f0fac31072bcc885
LU-15743 utils: add --xattr option to lfs find

This adds a new "[!] --xattr" option to lfs find to enable listing
files that match a given extended attribute. The option takes an
argument in the form "NAME[=VALUE]" where NAME is a regular
expression for the attribute name and VALUE is an optional regular
expression to match the named attribute's value. If the option is
negated, only files that do not match the option are listed.

The provided regular expressions must match the entire name or value,
not just a substring. If only NAME is provided, files will match if
they have an extended attribute matching the name, regardless of the
attribute's contents. The option may be specified multiple times, and
files must match every provided argument in this case.

Signed-off-by: Thomas Bertschinger <bertschinger@lanl.gov>
Change-Id: I7b02e704b741ee30387a827dd5a25a20574cc3df
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52804
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Alexandre Ioffe <aioffe@ddn.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/doc/lfs-find.1
lustre/include/lustre/lustreapi.h
lustre/tests/sanity.sh
lustre/utils/lfs.c
lustre/utils/liblustreapi.c