Novell LINUX ENTERPRISE DESKTOP 10 SP2 - DEPLOYMENT GUIDE 08-05-2008 Deployment Manual page 374

Table of Contents

Advertisement

To list the contents of home directories of other users, enter ls ~username . In the
example directory tree in
(page 355), one of the sample users is tux. In this case, ls ~tux would list the contents
of the home directory of tux.
NOTE: Handling Blanks in Filenames or Directory Names
If a filename contains a space, either escape the space using a back slash (\)
in front of the blank or enclose the filename in single or double quotes. Other-
wise Bash interprets a filename like My Documents as the names of two files
or directories. The difference between single and double quotes is that variable
expansion takes place within double quotes. Single quotes ensure that the shell
sees the quoted string literally.
15.1.4 Useful Features of the Shell
Entering commands in Bash can include a lot of typing. In the following, get to know
some features of the Bash that can make your work a lot easier and save a lot of typing.
History and Completion
By default, Bash "remembers" commands you have entered. This feature is called his-
tory. To repeat a command that has been entered before, press ↑ until the desired com-
358
Deployment Guide
2a Enter touch myfile.txt. The touch command with the myfile.txt
option creates a new, empty file named myfile.txt in your current direc-
tory.
2b Check this by entering ls -l. The new file should appear in the list of
contents.
2c Enter cp myfile.txt ../tmp/test. This copies myfile.txt to
the directory /tmp/test without changing the name of the file.
2d Check this by entering ls -l /tmp/test. The file myfile.txt should
appear in the list of contents for /tmp/test.
Figure 15.4, "Excerpt from a Standard Directory Tree"

Advertisement

Table of Contents
loading

This manual is also suitable for:

Linux enterprise desktop 10 sp2

Table of Contents