mirror of
https://gitlab.com/sortix/sortix.git
synced 2023-02-13 20:55:38 -05:00
Add features to ls(1) and fix implementation issues.
New options: -1 Disable columnizing. -c Sort by file status change time. -C Column directory entries. -h Show file sizes with magnitude suffixes such as 42.3K. -r Sort entries in the opposite order. -R Recursively list directory contents. -S Sort by file size in decreasing order. -u Sort by access time. --color=always|auto|never Control whether colorizing is enabled. The output is now natively columnized instead of running a column(1) subprocess. Multiple operands are now implemented correctly (directory contents are columned separately rather than their concatenation, the name of each directory is printed prior to its content, ...). The file owner and group names are now shown rather than a hard-coded root. Long listings are now properly aligned. Mixing file and directory operands works correctly now. Columnizing is now vertical rather than across. Clean up the source code and remove cruft. Stat information on directory entries are read once only now, which which fixes an incosistent sort race condition when sorting according to lstat. Move to the openat paradigm.
This commit is contained in:
parent
224c6595bc
commit
328f4e1fd6
1 changed files with 776 additions and 369 deletions
1125
utils/ls.cpp
1125
utils/ls.cpp
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue