1
0
mirror of https://github.com/chubin/cheat.sh.git synced 2026-06-20 13:16:44 +02:00
Files
cheat.sh/tests/results/2
Anatoli Babenia e50a9f937f Update tests
CHEATSH_UPDATE_TESTS_RESULTS=YES bash run-tests.sh
2021-10-17 10:40:53 +03:00

2.4 KiB

cheat:ls
# To display everything in <dir>, excluding hidden files:
ls <dir>
 
# To display everything in <dir>, including hidden files:
ls -a <dir>
 
# To display all files, along with the size (with unit suffixes) and timestamp
ls -lh <dir>
 
# To display files, sorted by size:
ls -S <dir>
 
# To display directories only:
ls -d */ <dir>
 
# To display directories only, include hidden:
ls -d .*/ */ <dir>
 
tldr:ls
# ls
# List directory contents.
# More information: <https://www.gnu.org/software/coreutils/ls>.
 
# List files one per line:
ls -1
 
# List all files, including hidden files:
ls -a
 
# List all files, with trailing `/` added to directory names:
ls -F
 
# Long format list (permissions, ownership, size, and modification date) of all files:
ls -la
 
# Long format list with size displayed using human-readable units (KiB, MiB, GiB):
ls -lh
 
# Long format list sorted by size (descending):
ls -lS
 
# Long format list of all files, sorted by modification date (oldest first):
ls -ltr
 
# Only list directories:
ls -d */