Listing Directory Contents

Working in UNIX requires information on the current working directory and it's contents. Both of these commands are simple to execute within the Terminal window. If you want to know where you are, just type pwd (print working directory), and then press Return. UNIX does not print anything; instead it displays the path and name of the current working directory, such as Users/andyanderson. To list the contents of that directory type the ls (list) command, and then press Return. The terminal window displays the contents of the working directory, i.e. Users/andyanderson. But it doesn't stop here, to list the contents of a specific directory, type ls and the directory path—for example, ls Users/andyanderson/ Documents. In ...

Get Show Me Mac® OS X, v10.3 Panther™ 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.