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 .htm .html *.htm 

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.




    NovellR Open Enterprise Server Administrator's Handbook SUSE LINUX Edition
    Novell Open Enterprise Server Administrators Handbook, SUSE LINUX Edition
    ISBN: 067232749X
    EAN: 2147483647
    Year: 2005
    Pages: 178

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net