O'Reilly logo

Ubuntu Unleashed 2013 Edition: Covering 12.10 and 13.04, Eighth Edition by Matthew Helmke

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Listing the Contents of a Directory with ls

The 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

Note

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required