



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Material Type: Notes; Class: Systems Programming; Subject: Computer Science; University: Old Dominion University; Term: Unknown 1989;
Typology: Study notes
1 / 5
This page cannot be seen from the preview
Don't miss anything!




First:
Login to your Unix account and type:
% /home/cs476/mlist
To put your login name in cs476 mailing list.
Introduction to UNIX
To change the behavior of programs. Examples : .login, .cshrc, .mailrc, .forward, etc...
Extensive on-line documentation. Examples : man, info, xman, apropos, whereis, which, etc..
You may use any program to edit a file. Examples : vi, emacs. ed, MS word, notebad, etc...
You may use any debugger to debug a program. Example : gdb
You may access individual bits of any byte. Example : bits
% ls -l
% touch
Example : % mkdir test % cd test
% touch file % ls -l -rw------- 1 wahab faculty 0 Aug 1 23:25 file % touch 1226112272 file /* which touch? */ % ls -l -rw------- 1 wahab faculty 0 Dec 26 1972 file % find
Example :
Remove all files under directory test named a.out or *.o that have not been accessed for a week:
% find ./test ( -name a.out -o -name '*.o' ) -atime + -exec rm {} ; % chmod -R a+rx *
% cp -r path1 path
% rm -r path
Creating the world's first chat!
% cat >> /tmp/wahab % tail -f /tmp/wahab
Job control
% sort bigfile1 > bigfile ^Z
% jobs ....... list of background jobs ........... % kill -9 %job
% ps ......... list of processes .................. % kill -9 process
....... , " ....."% echo * % echo * quote ONE char % echo '***><?' qoute ANY number of chars % mail cat list < letter command substitution % echo "pwd $home" does not qoute ... and $
Bourne shell:
$ path=.:/bin:/usr/bin path is a standard shell variable $ echo $path $ d=pwd d is a user defined shell variable $ echo $d
PS: no spaces around =
csh shell:
% set path=.:/bin:/usr/bin % set d = pwd
% setenv DISPLAY dogwood.cs.odu.edu: % echo $DISPLAY
Environment variables: are automatically exported to all child processes. Shell varibales: has to be explicitly exported.
Example:
% set x=pwd % setenv y pwd % echo $x $y % csh % echo $x $y x is undefined but y is defined.