Ls

ls stands for List Files. It lists files! Very Simple.

It's usefulness extends beyond listing files because you can look up some more detailed information, by adding -a or -l options.

Options are different between mac and linux. Fortunately, common commands are user friendly, and usually have a -h or --help option, or a man page. You can view man pages for all common commands using "man ls" or "man pwd" or "man cd". remember that you just have to press 'q' to exit a man page.

Relevant Usage at Saier Lab
List files. Always useful. Here's some options that you may also find useful:

All (-a)
ls -a This command shows you all files. All this means is hidden files will be displayed too.

Long (-l)
ls -l This command shows you more detailed information, such as the date the file was last modified, as well as read/write/execute privileges.

Time (-T)
ls -lT This command only works on Macintosh computers. If you're not sure, just check the man page by typing "man ls". Information at your fingertips! Remember that you just have to press 'q' to exit a man page.

This command will showed you more detailed information on the time the file was last modified. Instead of just "May 9", it will give you the year, date, and maybe even the time. This might be useful for when you're trying to figure out which files you haven't touched for a year or so.

Viewing Folder Contents of Other Folders
If you enter in the path of a folder as a command line argument to ls, then ls will display the contents of that folder instead of the folder you're currently in. If you're in the folder "/User/saierlab/" and you want to see what's in "/User/saierlab/Desktop", just type: ls Desktop

If you're in the folder "/User/saierlab/Desktop" and you want to see what's in "/User/saierlab", just type: ls .. The terminal will interpret ".." as the parent directory.

This can be combined with options, as well: ls -a Desktop

Person to Ask

 * Bryant
 * Anyone