March 2002
Beginner
504 pages
10h 47m
English
In Chapter 3, “Working with Files,” you looked at using the ls command to list the files in the current directory. Now let's look at using the ls command to list the files in any directory.
To list the files in a directory, you can use the following syntax:
ls dir
Here, dir is the absolute or relative pathname of the directory whose contents you want listed.
For example, both of the following commands will list the contents of the directory /usr/local (assuming that the working directory is /home/ranga):
$ ls /usr/local $ ls ../../usr/local
On my system, the listing resembles
X11 bin gimp jikes sbin ace doc include lib share atalk etc info man turboj-1.1.0
The listing on your system might ...
Read now
Unlock full access