17.12.1 File Commands
The following section lists the most important commands for le management. It
covers everything from general le administration to the manipulation of le system
ACLs.
17.12.1.1 File Administration
ls [options] [files]
If you run ls without any additional parameters, the program lists the contents
of the current directory in short form.
-l
Detailed list
-a
Displays hidden les
cp [options] source target
Copies source to target.
-i
Waits for conrmation, if necessary, before an existing target is overwritten
-r
Copies recursively (includes subdirectories)
mv [options] source target
Copies source to target then deletes the original source.
-b
Creates a backup copy of the source before moving
-i
Waits for conrmation, if necessary, before an existing targetfile is overwrit-
ten
rm [options] files
Removes the specied les from the le system. Directories are not removed by
rm unless the option -r is used.
-r
Deletes any existing subdirectories
-i
Waits for conrmation before deleting each le
ln [options] source target
Creates an internal link from source to target. Normally, such a link points directly
to source on the same le system. However, if ln is executed with the -s option,
Shell Basics 215