O'Reilly logo

The Linux Command Line by William E. Shotts Jr.

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

To list the files and directories in the current working directory, we use the ls command:

[me@linuxbox ˜]$ ls
Desktop  Documents  Music  Pictures  Public  Templates  Videos

Actually, we can use the ls command to list the contents of any directory, not just the current working directory, and it can do many other fun things as well. We’ll spend more time with ls in Chapter 3.

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