Listing the Contents of a Directory with ls
ls command lists the contents of the current directory. It is commonly used by itself, but a number of options (also known as switches) are available for
ls and give you more information. If you have just logged in as described earlier, this command lists the files and directories in your user’s home directory:
matthew@seymour:~$ lsDocuments Music file.txt Pictures Music
All directory listings in this chapter are abbreviated to save space.
By itself, the
ls command shows just a list of names. Some are files, some are directories. This is useful if I know what I am looking for but cannot remember the exact name. However, using
ls in this matter has some limitations. First, it does ...
Get Ubuntu Unleashed 2013 Edition: Covering 12.10 and 13.04, Eighth Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.