Unix Commands

UNIX COMMANDS WITH DESCRIPTION

COMMANDS

DESCRIPTION

cal

Print a calendar. cal 9 1992 prints month of September 1992

cat

Concatenate and print files. cat .login displays your login initialization file

cd

Change working directory. cd / and then Is will print the root directory; cd by itself will return you to your home directory)

chmod

Change mode (file permissions) on file(s) and/or directory(s).

cp

Copy files. cp filel file will copy the contents of file1 into file2. Note that if file2 already exists it will be overwritten with the contents of file1

date

Print current time and date.

echo

Echo arguments. Try echo this is fun

exit

logout Terminate session

finger

Provide user information. Try finger your_last_ name

grep

Search for a string or regular expression. grep path .cshrc will find all occurrences of the word "path" in the file .cshrc

ls

List contents of a directory. ls -al gives a long listing of all files in current directory, such as permissions on the file, file ownership, and the date the file was last modified)

mkdir

Make a directory. mkdir testdir will create a directory called testdir

more

more filenname or pg filename will scroll the file called filename on the screen. Hit the SPACE bar to scroll one screen forward

mv

Move or rename files or directories. mv file1 file2 will move file1 into file2. Note that if file2 already exists its contents will be overwritten by file1

passwd

allows you to Change password. (Prompts for information)

pwd

Print working directory

rm

Remove file(s). Try rm -i filename

rmdir

Remove directory

sort

Sort and collate lines

vi

Standard UNIX editor

who

Who is logged in on the system

 

DOS COMMANDS WITH UNIX COMMAND EQUIVALENCE

     From time to time you may need to know some basic Unix commands.   Listed below is a basic Dos
     command to Unix conversion chart to assist in getting to know Unix a little better.

DOS Command

Closest UNIX Command

Description

CHDIR (CD)

cd

Change directory

CLS

clear, tput clear

Clear the terminal screen

COMMAND

csh, sh, ksh

User shells (command processors)

COMP, FC

diff file1 file2

Comparefiles

COPY

cp

Copy a file or group of files

COPY

cat file1 file2 >file3

Concatenate file1 and file2 to file3

DATE

date

Display and change system date

DIR

is, Is -al

List a directory

EDLIN

ed

Line-oriented editor

ERASE (DEL)

rm

Remove files

FIND

grep

Find text in files

MKDIR (MD)

mkdir

Make a directory

MODE

stty

Set terminal options

MORE

more, less, pg

Display a file a screen full at a time

PRINT

Ipr, xprint

Print files in the background

RENAME (REN)

mv

Move (rename) files

RMDIR (RD)

rmdir

Remove a directory

SET

set

Set the value of a variable

SORT

sort

Sort the contents of files

TIME

date

Display and change system time

TYPE

cat file

Display the contents of file