Novell Open Enterprise Server Administrators Handbook SUSE Linux Edition [Electronic resources]

Mike Latimer

نسخه متنی -صفحه : 150/ 120
نمايش فراداده

File Management

File management tools include those used for navigation and general file and directory manipulation. Refer to Table A.2 for these commands.

Table A.2. Filesystem Navigation 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. Common options include -s Create a symbolic, rather than hard, link
ls ls [OPTIONS] FILE Lists directory contents. Common options include -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 pwd Prints the path of the current working directory.
mkdir mkdir [OPTIONS] DIR Creates the specified directory. Common options include -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 l *

rm rm [OPTIONS] FILE Removes (deletes) files or directories. Common options include -i Prompt before deletion -r Delete contents of a directory recursively
rmdir rmdir DIR Removes empty directories.
touch touch FILE Creates an empty file.