File and Directory Commands

Command Description

pwd

Displays your current directory ("print working directory").

ls -l

Lists the files in the current directory, along with useful information about them.

ls -al

Includes hidden system files (those whose names start with a dot) in the list.

more filename

Pages through the contents of a file (forward only).

less filename

Pages through the contents of a file and lets you page back up through the file.

tail filename

Displays the last 10 lines of a file. This is helpful for log files. (The head commands displays the first 10 lines.)

cp source destination

Copies a file or directory.

mv source destination

Moves or renames a file or directory.

find starting_directory -name filename

Find the specified file, starting in the specified directory. Specifying / would start the find operation in the root directory.

grep string file

Searches the specified file for the specific string of characters. This is useful for locating specific information in GroupWise agent startup files.

mkdir directory_name

Creates a new directory

rmdir directory_name

Deletes an empty directory

rm filename

Deletes a file

rm -r directory_name

Deletes a directory and recursively deletes its contents.

cat filename

Displays a file.

cat filename /printer_device

Prints a file.