Whamcloud - gitweb
LU-7495 utils: add --links option for lfs find
authorThomas Bertschinger <bertschinger@lanl.gov>
Sun, 7 May 2023 17:34:42 +0000 (13:34 -0400)
committerAndreas Dilger <adilger@whamcloud.com>
Sat, 17 Jun 2023 05:35:55 +0000 (05:35 +0000)
commitd7838d329316f641e3e0bb401c8415c605caac26
tree5c135e2a821f10fc433c69daa1651d2c235d3fdb
parent989a55dfe794705a5e591dd82392f4c272f1f236
LU-7495 utils: add --links option for lfs find

This adds a "--links" option for lfs find to filter files and
directories by the number of hard links. It also adds a printf format
'%n' to print the number of links for a file.

This commit also fixes '-l' as a short option for '--lazy' which was
added in 11aa7f8704c490b011f60f234c3ac9929ce76948 but the short option
did not work.

Lustre-change: https://review.whamcloud.com/50886
Lustre-commit: f759d6386d5d0edb95d683d97ca8d84c80080c1c

Signed-off-by: Thomas Bertschinger <bertschinger@lanl.gov>
Change-Id: I5d15bc290df8e8a08402f8d5cfa0a7139791b0a4
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Anjus George <georgea@ornl.gov>
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/51327
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