List Directory (ls)
Use: Use the list (ls) command to see the contents of a directory or confirm that a file you requested has moved to the location you wanted.
There are a few options you can use with them as well.
eos$ ls
OR
eos$ ls pathname
Dash options (can be used in any order):
-l | list the contents in long format (all information, size, date, owner, etc.) |
-a | list ALL files, even “.” (dot) files and hidden files |
-al OR -la | lists ALL files in long format |
Example
To list the contents of your home directory while in your home directory.
eos$ ls
You can use the ls command to list the contents of a directory other than your current working directory by specifying a pathname.
Should I expect an output?
Yes:
MyDocuments MyE115 File.txt
Note: Contents of the directory will vary depending on user and directory