The ls command

The ls command



What does it do ?

The ls (list) utility is used to display a list of the names of the files in your directory.


How is it used ?

ls filename


Examples and remarks

If you type in the command ls -l assignment1.c, you can find out if the file assignment1.c exists, when it was created and how big it is. You can also use ll assignment1.c. This will give you the same information. The command ll is an alias for ls -l.

A very important and useful command is the ls -a command which will show you your .* files. These are also known as your hidden files. Type this command at the UNIX prompt and you will get a list of all your hidden files in your current directory.

To find more information regarding the ls command, you can access the man pages by typing man ls at the UNIX prompt.


next previous table of contents