ls filename
If you do not give a filename, the current directory is listed. The command may also be used with individual files. If you type ls and a filename, ls repeats its name and any information requested. You can get certain information about a file by using the options available with the command ls.
malama% ls -s params
4 params
malama%
The option -s tells the system to print the size of the file in blocks (2 blocks is a kilobyte, as with VMS). You can use the -s option when listing a directory and it will list each file in the directory with its size.
While on the topic of options available with ls, we should mention two very useful options: -a and -F . -a will include all files whose names start with ``.'', which are normally hidden. Important files, such as ``.login'' (your login file) will only be listed if you use the -a option. There may be situations where you don't particularly care to see these, as in general they have special functions. -F (note uppercase), will distinguish different types of files by placing a symbol after the name, for example, directories with a /, and executable files with a *. You may wish to ``alias'' (see later) ls permanently to e.g. ``ls -sF'' in your .login file.