O'Reilly logo

SAMS Teach Yourself Unix in 10 Minutes by Robert Shimonski

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

Unix File Listing

Up to now, all the commands you have learned have been important. Not one of them is uncommonly used or seen. This next command we discuss, however, will be a command that you use just about all the time as a typical Unix user, so we will spend some quality time reviewing its details as closely as possible. The command you do this with is the ls command, which lists files. Issued without any arguments (also known as switches), ls lists the files and subdirectories in the current directory. You can, of course, list files in a different directory by specifying that directory in the path statement or simply by changing into that directory and then issuing the ls command. An example of using pwd and ls is seen here:

> pwd /priv/home/rob/temp/newwebsite/ ...

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