Unix Commands: ls
Posted 01/23/2011 at 3:29pm
| by Cory Bohon
This command is used to list the directories and files while browsing through the command line. This command is typed with a lower-case “L” and “S” followed by the enter key (to send the command).

After typing the command, the Terminal screen will have all of the files and directories listed inside of the working directory.
There are two variations on this command that provides more functionality than just listing the files and folders for a particular directory. These commands are:

ls -l - Gives a long listing of the files and directories in the current directory. In addition, this command will also show the permissions, user the file/directory belongs to, and the creation date.

ls -a - Lists all of the files/directories (including hidden files) in the current directory. This command is useful if you have a hidden file that you need to find, edit, or delete.