File management tools include those used for navigation and general file and directory manipulation. Refer to Table A.2 for these commands.
COMMAND
GENERAL USAGE
DESCRIPTION
cd
cd DIR
Changes directories.
cp
cp [OPTIONS] SOURCE DEST
Copies files or directories.
Common options include
-d Copy symbolic links
-R Copy directories recursively
ln
ln [OPTIONS] SOURCE TARGET
Creates a link between two files.
-s Create a symbolic, rather than hard, link
ls
ls [OPTIONS] FILE
Lists directory contents.
-a Show all files, including hidden files starting with "."
-A Show almost all filesomit "." and ".."
-d List directory entries rather than contents
-l Display a long listing of contents, including file mode, ownership, and timestamp
-R Perform a recursive listing
pwd
Prints the path of the current working directory.
mkdir
mkdir [OPTIONS] DIR
Creates the specified directory.
-p Create parent directories if necessary
mv
mv SOURCE DEST
Moves files or directories from one location to another.
Also used to rename individual files or directories.
rename
rename FROM TO FILES
Renames multiple files or directories.
Example:
rename .htm .html *.htm
rm
rm [OPTIONS] FILE
Removes (deletes) files or directories.
-i Prompt before deletion
-r Delete contents of a directory recursively
rmdir
rmdir DIR
Removes empty directories.
touch
touch FILE
Creates an empty file.