From f0bfd374ce10c7d8b8f9cec3106ac11de1c97abc Mon Sep 17 00:00:00 2001 From: rwatson Date: Sun, 9 Mar 2008 12:10:24 +0000 Subject: Make chflags(1) more chmod(1)-like (and more feature complete): - Add -v to print file names as they are processed; -vv prints the flags change as well. - Add -f to ignore failures with the same semantics as chflags(1), neither printing an error nor affecting the return code. - Don't try to set the flags if they won't change. I made minor cosmetic tweaks to the code in the patch. MFC after: 1 week PR: 112827 Submitted by: Ighighi --- bin/chflags/chflags.1 | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'bin/chflags/chflags.1') diff --git a/bin/chflags/chflags.1 b/bin/chflags/chflags.1 index eb4f6e2..904c366 100644 --- a/bin/chflags/chflags.1 +++ b/bin/chflags/chflags.1 @@ -40,7 +40,7 @@ .Nd change file flags .Sh SYNOPSIS .Nm -.Op Fl h +.Op Fl fhv .Oo .Fl R .Op Fl H | Fl L | Fl P @@ -57,6 +57,12 @@ operand. .Pp The options are as follows: .Bl -tag -width indent +.It Fl f +Do not display a diagnostic message if +.Nm +could not modify the flags for +.Va file , +nor modify the exit status to reflect such failures. .It Fl H If the .Fl R @@ -79,6 +85,14 @@ This is the default. .It Fl R Change the file flags for the file hierarchies rooted in the files instead of just the files themselves. +.It Fl v +Cause +.Nm +to be verbose, showing filenames as the flags are modified. +If the +.Fl v +option is specified more than once, the old and new flags of the file +will also be printed, in octal notation. .El .Pp The flags are specified as an octal number or a comma separated list -- cgit v1.1