From 4a2498d22f46bfc52170baec6db4ce67671ac103 Mon Sep 17 00:00:00 2001 From: Lei Feng Date: Thu, 16 Jun 2022 10:45:51 +0800 Subject: [PATCH] LU-15952 doc: improvement on lfs-project doc Describe 'lfs project -C' clearly. Signed-off-by: Lei Feng Test-Parameters: trivial Change-Id: I1e0f70a9116265edac993b12b775bd57c8587d40 Reviewed-on: https://review.whamcloud.com/47641 Reviewed-by: Andreas Dilger Tested-by: jenkins Tested-by: Maloo Reviewed-by: Li Dongyang Reviewed-by: Oleg Drokin --- lustre/doc/lfs-project.1 | 18 ++++++++++++++---- lustre/utils/lfs.c | 2 +- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/lustre/doc/lfs-project.1 b/lustre/doc/lfs-project.1 index cabd831..9b2c4ed 100644 --- a/lustre/doc/lfs-project.1 +++ b/lustre/doc/lfs-project.1 @@ -8,7 +8,7 @@ lfs project \- Change or list project attribute for specified file or directory. .br .BR "lfs project" " -c" " [" -d | -r " [" -p " "\fIID ] " [" -0 ] ] " <" file | directory...> .br -.BR "lfs project" " -C" " [" -r | -k ] " <" file | directory...> +.BR "lfs project" " -C" " [" -d | -r "] [" -k ] " <" file | directory...> .br .SH DESCRIPTION .TP @@ -59,16 +59,26 @@ if checking a directory and or recursively, print only files that do not match. Print pathnames found by -c with a trailing NUL for use by .BR \' xargs "(1) " -0 \'. .TP -.BR "lfs project" " -C [" -r | -k ] +.BR "lfs project" " -C [" -d | -r "] [" -k ] .RI < file | directory...> .TP Clear the project inherit flag and ID on the file(s) or directories .TP .B -C -Clear inherit attribute, project ID will be reset to be 0 in default +Clear inherit attribute and reset project ID to 0 for file or directory. +.TP +.B -d +Clear only the directory itself. +.TP +.B -r +Clear the directory and all its descendants recursively. +.TP +.B "" +If neither \fB-d\fR nor \fB-r\fR is specified, clear the directory and its +immediate children. .TP .B -k -keep the project ID unchanged. +Keep the project ID unchanged. .TP .SH EXAMPLES .TP diff --git a/lustre/utils/lfs.c b/lustre/utils/lfs.c index 8f4e91b..116fda3 100644 --- a/lustre/utils/lfs.c +++ b/lustre/utils/lfs.c @@ -460,7 +460,7 @@ command_t cmdlist[] = { " set project ID and/or inherit flag for specified file(s) or directories\n" " project -c [-d|-r [-p id] [-0]] \n" " check project ID and flags on file(s) or directories, print outliers\n" - " project -C [-r] [-k] \n" + " project -C [-d|-r] [-k] \n" " clear the project inherit flag and ID on the file or directory\n" }, #endif -- 1.8.3.1