Navigate: homepage/help/ls

UNIX Commands quick help

LS

Sort by newest

ls -lAhFstxb
total 64K
4,0K .git/           4,0K config.h         8,0K main.c
 20K a.out*          4,0K README.md        4,0K style.css
4,0K index.get.html  4,0K index.post.html  4,0K favicon.ico
4,0K .vscode/        4,0K .gitignore


-v : natural sort of (version) numbers within text
-A : not list implied . and ..
-h : print sizes like 1K 234M 2G etc.
-F : append indicator (one of */=>@|) to entries
-s : print the allocated size of each file, in blocks
-x : list entries by lines instead of by columns
-b : print C-style escapes for nongraphic characters
-t : sort by modification time, newest first

Sort by size

ls -lAhFstxb
total 64K
 20K a.out*     8,0K main.c           4,0K .git/
4,0K .vscode/   4,0K favicon.ico      4,0K index.get.html
4,0K config.h   4,0K index.post.html  4,0K README.md
4,0K style.css  4,0K .gitignore


-v : natural sort of (version) numbers within text
-A : not list implied . and ..
-h : print sizes like 1K 234M 2G etc.
-F : append indicator (one of */=>@|) to entries
-s : print the allocated size of each file, in blocks
-x : list entries by lines instead of by columns
-b : print C-style escapes for nongraphic characters
-t : sort by modification time, newest first
alias lss="ls -lAhFstxb"
alias lsS="ls -lAhFsSxb"