2.4.11. ls#
ls lists files and directories.
2.4.11.1. Common ls usage#
Use
lsto see what files and folders are in the current location.The default is to list the files in the current directory. Adding options can change how the list is organized.
ls [option] [directory]
List directories
ls -d
Long list format
ls -l
Sort by time (newest first)
ls -t
List files with file size in kilobytes/megabytes/gigabytes
ls -h
Sort alphabetically
ls -X