From 44022c7d068a195e1f909354aed454decbfce954 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Fri, 31 Jan 2020 22:40:52 -0800 Subject: lsattr/chattr: improve help text. Document all the attributes, and take less space doing so. Switch to CAPITALS for user input in the synopses. Don't imply that this is only for ext2 (but also don't try to list the subset of file systems that do support which subset of attributes). --- toys/other/lsattr.c | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/toys/other/lsattr.c b/toys/other/lsattr.c index 76db649f..24591d53 100644 --- a/toys/other/lsattr.c +++ b/toys/other/lsattr.c @@ -14,9 +14,9 @@ config LSATTR bool "lsattr" default y help - usage: lsattr [-Radlpv] [file...] + usage: lsattr [-Radlpv] [FILE...] - List file attributes on a Linux second extended file system. + List file attributes on a Linux file system. Flag letters are defined in chattr help. -R Recursively list attributes of directories and their contents @@ -30,9 +30,9 @@ config CHATTR bool "chattr" default y help - usage: chattr [-R] [-+=AacDdijsStTu] [-p projid] [-v version] [file...] + usage: chattr [-R] [-+=AacDdijsStTu] [-p PROJID] [-v VERSION] [FILE...] - Change file attributes on a Linux second extended file system. + Change file attributes on a Linux file system. -R Recurse -p Set the file's project number @@ -44,21 +44,19 @@ config CHATTR '=' Set attributes Attributes: - A Don't track atime - a Append mode only - C No copy on write - c Enable compress - D Write dir contents synchronously - d Don't backup with dump - F Case-insensitive directory lookups (casefold) - i Cannot be modified (immutable) - j Write all data to journal first + A No atime a Append only + C No COW c Compression + D Synchronous dir updates d No dump + E Encrypted e Extents + F Case-insensitive (casefold) + I Indexed directory i Immutable + j Journal data + N Inline data in inode P Project hierarchy - S Write file contents synchronously - s Zero disk storage when deleted - T Top of directory hierarchy - t Disable tail-merging of partial blocks with other files - u Allow file to be undeleted + S Synchronous file updates s Secure delete + T Top of dir hierarchy t No tail-merging + u Allow undelete + V Verity */ #define FOR_lsattr #include "toys.h" -- cgit v1.2.3