This command provides information about the contents and permissions of files within the file system. The bare command ls will list the files in the current directory. In addition to the many options that can be used with this command, the last element on the command line can be a file or directory specification. Wild cards are appropriate here, so ls m* will list all files in the current directory that begin with m. There are many options that can be used with the ls command. A few of the more useful are:
Example:
ls -l /dev/l
brw-rw-- 1 root cdrom 24, 0 Jan 17 09:45 /dev/lmscd
srw-rw-rw- 1 root root , 0 Jun 8 23:49 /dev/log
brw-rw-- 1 root disk 7, 0 Sep 23 1996 /dev/loop0
brw-rw-- 1 root disk 7, 1 Sep 23 1996 /dev/loop1
brw-rw-- 1 root disk 7, 2 Sep 23 1996 /dev/loop2
brw-rw-- 1 root disk 7, 3 Sep 23 1996 /dev/loop3
brw-rw-- 1 root disk 7, 4 Sep 23 1996 /dev/loop4
brw-rw-- 1 root disk 7, 5 Sep 23 1996 /dev/loop5
brw-rw-- 1 root disk 7, 6 Sep 23 1996 /dev/loop6
brw-rw-- 1 root disk 7, 7 Sep 23 1996 /dev/loop7
crw-rw-- 1 root lp 6, 0 Jan 17 09:45 /dev/lp0
crw-rw-- 1 root lp 6, 1 Jan 17 09:45 /dev/lp1
lists all the files in /dev that begin with l and lists them in the long format.