Red Hat ENTERPRISE LINUX 4 - STEP BY STEP GUIDE Manual page 67

Table of Contents

Advertisement

Chapter 4. Shell Prompt Basics
The following is a brief list of options commonly used with
by reading the
man page (
ls
(all) — Lists all files in the directory, including hidden files (
-a
top of your list refer to the parent directory and the current directory, respectively.
(long) — Lists details about contents, including permissions (modes), owner, group, size, cre-
-l
ation date, whether the file is a link to somewhere else on the system and where its link points.
(file type) — Adds a symbol to the end of each listing. These symbols include
-F
directory;
, to indicate a symbolic link to another file; and
@
(reverse) — Lists the contents of the directory in reverse sort order.
-r
(recursive) — Lists the contents of all directories below the current directory recursively.
-R
(size) — Sorts files by their sizes.
-S
The
command can also be used with wildcards to display information on files or directories that
ls
match a certain pattern. To list all files and directories that begin with the letter "a", enter the following
command.
ls -al a*
Remember that Linux is case-sensitive. The above command will not display information on files that
start with "A".
4.5.2. Copying files with cp
To create a copy of an existing file, use the
While cp does have options, they are not used as often as those of other commands. To view these
options, read the man page by entering
To copy a file within the current directorym specify the new name as the third wod on the command
line.
cp original_file new_file
This command creates a new file, named
Figure 4-3. Sample
).
man ls
man cp
new_file
Output for the
ls
/etc
. Remember, you can view the full list
ls
, to indicate an executable file.
*
command.
cp
at a shellprompt.
, with the same content as the original file.
Directory
). The
.filename
..
, to indicate a
/
53
and
at the
.

Advertisement

Table of Contents
loading

This manual is also suitable for:

Enterprise linux 4

Table of Contents