0% found this document useful (0 votes)
10 views30 pages

Proj2-The Unix System

Uploaded by

kr.hariom002
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views30 pages

Proj2-The Unix System

Uploaded by

kr.hariom002
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 30

Introduction to Networking

The UNIX SYSTEM


Unix Tools
• Shells
• Useful Commands
• Pipes & Redirects
Shells
• sh, csh, ksh, tcsh, bash, zsh
• Recommend tcsh or bash for interactive use.
Both have command completion, simple
command line editing and simple to use history
facilities.
• Change logon shell using chsh
Intro to Unix: Files
• Filesystem a single tree ( no drives )
• Filenames case senstitive
• Physical devices can be mounted anywhere

tmp dev etc home usr

chris mary lib include bin local

lib include bin


Some basic commands
• the bash shell has automatic completion, just press <TAB>
• completion is used for command names and for file names
– try:
• pressing <tab> twice gives you all options
Intro to Unix: Essential Cmds
• cd - change directory - cd
• mkdir - make a directory - md
• cp - copy a file - copy
• ls - list files - dir
• rm - remove a file - del
• mv - move a file - move & ren
• grep - expression searching
• top - cpu and memory usage
• who/w - who else is logged in
• man - read documentation
Other unix commands
• where am I?
– pwd
• who is around?
– who
• where is that file?
– find <path> -name <name>
Using find and grep with wildcards
• we can use “wildcard”characters to make searches more general
• “*” is the main one, means any set of characthers
• ex:
– find /home/brian -name “*.ppt” : finds all powerpoint files in the account
– grep human *.txt : look for the word “human” in all the files in my directory.
Pipes & redirects
• Pipes are used to pass the output from one
Unix command as the input to another Unix
command.
ls | grep “mmk”
• Redirects are used to pass the output of a Unix
command into a file.
ls > directory_listing
Text Editors
• Crucial tools for using Unix
• Two main editors
– emacs
– vi
• Great features in both:
– Syntax highlighting
– Brace matching
– Sophisticated text manipulation/movement
– Scriptable
– …
Introduction to Networking

GCC and make

Jan 12 2005
Recital 2
Development tools in UNIX
• Creation of source files (.c, .h, .cpp)
– Text editors (e.g. vi)
– Revision control systems (e.g. cvs)

• Compilation (e.g. *.c *.o) and linking


– Compilers (e.g. gcc)
– Automatic building tools (e.g. make)

• Running and testing programs


– Debuggers (e.g. gdb)
Links
• http://acm.cs.virginia.edu/archives/events/work
shop/unix/
• http://courses.cs.vt.edu/~cs2204/spring2002/s
chedule.html
• http://www.cs.toronto.edu/~culhane/Teaching/
209-Fall97/Slides/

You might also like