ls is a command to list files in Unix and Unix-like operating systems. ls displays files in a bare format. It is a shortening of 'list'. The list of arguments for ls include:
* -l long format, displaying Unix file types, permissions, number of hard links, owner, group, size, date, and filename
* -F appends a character revealing the nature of a file, for example, * for an executable, or / for a directory. Regular files have no suffix.
* -a lists all files in the given directory, including those whose names start with "." (which are hidden files in Unix). By default, these files are excluded from the list.
* -R recursively lists subdirectories. The command ls -R / would therefore list all files.
* -d shows information about a symbolic link or directory, rather than about the link's target or listing the contents of a directory.
* -t sort the list of files by modification time.
* -h print sizes in human readable format. (e.g., 1K, 234M, 2G, etc.)
$ ls -l
drwxr--r-- 1 fred editors 4096 drafts
-rw-r--r-- 1 fred editors 30405 edition-32
-r-xr-xr-x 1 fred fred 8460 edit
$ ls -F
Prices shown in USD.
Type your email address below to get our free Urban Word of the Day every morning!
Emails are sent from email@example.com. We'll never spam you.