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

Table of Contents

Advertisement

52
Action
Command
Move a file
mv
Rename a file
mv
Table 4-2. Commands for Manipulating Files
Each of the commands listed above have options that may be specified on the command line. More
information about each is provided below.
4.5.1. Viewing Directory Contents with ls
To see what is in your current working directory, use the
Many options are available with the
the files in the directory. Some files are hidden files (also called dot files) and can only be seen with
an additional option specified to the
Tip
To view all
command options, read the man page by entering
ls
the man page, enter
Enter the command
ls -a
Viewing all the files using the
more information by using multiple options.
To see the size of a file or directory, when it was created, and so on, add the long option (
command. This command shows the file creation date, its size, ownership, permissions, and more.
-a
You do not have to be in the directory whose contents you want to view to use the
example, to see what is in the
ls -al /etc
Format
mv which_file
destination
mv oldname newname
command. The
ls
command.
ls
man ls | col -b | lpr
. Now you an view the hidden "dot" files.
command can give you plenty of detail, but you can view still
ls -a
directory from your home directory, type:
/etc/
Chapter 4. Shell Prompt Basics
Details
To move a file from one
directory to another, use
The use of the
changes the name of the file
from
command.
ls
command, by itself, does not show all of
ls
man ls
at the prompt.
mv
command
mv
to
oldname
newname
at a shell prompt. To print
) to the
-l
command. For
ls
.
.
ls

Advertisement

Table of Contents
loading

This manual is also suitable for:

Enterprise linux 4

Table of Contents