Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

CS 0132 - PRG IN C & GUIDE TO UNIX SYSTEM Rosta Farzan

Basic Unix Commands


Syntax Explanation Example Options
You can use different
client to connect to UNIX
system from Windows
Connecting to machine. You can
UNIX system download some of these
clients for free: e.g. Putty
(google for “download
Putty”)
Logging in to a UNIX
system requires a
Logging in
username and a
password.
ls Lists the content of your ls -a: list the files
Listing Files
current working directory and directories
and Directories
starting with .
mkdir Make a subdirectory in mkdir cs0132
Making <directory_name> your home directory with
Directories
the given name
cd <directory_name> Change the current cd cs0132 cd: change
working directory to the directory to your
Changing given directory home directory
Directory
cd ..: go back
one directory
Finding the pwd Finding out the current pwd
Pathnames working directory
touch <filename> Creating empty file touch
Creating File commands.txt
without editing
Using editor such Creating and editing a file
as emacs, vi
Viewing the cat <filename> View the content of the cat
content of a file commands.txt
File
less <filename> View the content of the less spacebar: go to
file – allows backup in a commands.txt next page
file
b: go to previous
age
cp <source> Make a copy of the cp
Copying Files <destination> source file into the commands.txt
specified destination test.txt
Help on man <command> Displays reference man less
commands manual pages

Few Unix Tutoriasl on the Web


 http://www.cgi101.com/help/unixhelp.html
 http://www.isu.edu/departments/comcom/unix/workshop/unixindex.html
 Google for “Unix Tutorial”

You might also like