Tutorial for Unix LS
UNIX is an operating system originally developed in 1969, but it later split into a number of branches, derivatives and new systems, such as Linux, that were written to allow UNIX applications to run on IBM-compatible hardware. Unix and most Unix-like systems contain a command called "ls" that lists the contents of a directory. The command accepts different parameters, each of which allow you to adjust the output of the content listing.
Instructions
-
-
1
Open a new terminal on your UNIX system. This varies based on your distribution, but most graphical interfaces have a "Terminal" option in their application menus. You can also connect remotely by SSH or Telnet to immediately access a terminal.
-
2
Navigate to the directory you would like to list. You are placed in your account's home directory by default. You can change your current directory by typing "cd /path/to/directory" without quotation marks, substituting "/path/to/directory" with the location of the directory in which you would like to work.
-
-
3
Type "ls" without quotation marks to display a brief list of files in the directory. Press "Enter."
-
4
Type "ls -a" without quotation marks to see configuration files, which are hidden on the default view.
-
5
Type "ls -la" to see the owner of each file and the amount of space it is taking on the hard drive.
-
1
Tips & Warnings
You can pipe the output of ls through the less command on Unix if there is a lot of text to display. This lets you display the output in screen-sized chunks. Use the "|" character followed by the word "less" to do this. For example, type "ls -a | less" without quotation marks.