Joel Jaeggli (joelja@darkwing.uoregon.edu)
% !!(redo the last command)
% ^smith^smythe(redo last command changing smith to smythe)
% history(see old commands I've done)
% !5(redo command number 5)
% ls -la|more
would break up a long dir listing into readable chunks.
>
command would send the output of a command to a
file.
ls -la > foo.txt
would create a file foo.txt which contained the output of the ls -la command.
CRTL-c
which will tell the program to stop.
CRTL-z
will suspend the currently running process and put
you back at the % prompt.
fg
or bg
to put it to the background type bg, fg and bg have many more options which their respective man pages describe.
&
at the end
of the command.
% man csh
or the Unix C Shell Field Guide
fall97.dat
NOT FaLL-1997-datum-forms.dat
File Type: File extension ----------------------------------- Data file .dat Text file .txt Web document .html C source .c Fortran source .f Object file .o etc.
* --> ``match any zero or more characters''
? --> ``match exactly one character''
For example:
form*
matches form, form1, format, formula, etc.
% ls(list status of my files)
% ls -l(...including sizes and dates)
% ls -la(...including hidden files)
% ls -laR(...including subdirectories)
% ls -l | more(... and pause to let me read what's scrolling by)
% quota -v
% mv old.txt new.txt
% cp foo.txt bar.txt
% rm bar.txt
% lpr foo.txt
lpr
'' you are printing it (by default) to the text-only line printer in the CC machine room, NOT to a local laser or dot matrix printer.
% more foo.txt
more and less are two very useful tools for viewing files in your directories. more and less break files up into screen size chunks so that you can view them try typing:
% less foo.txt
% mkdir research
% mv klamath.dat research/.
% cd research
% cd ..
% cd $HOME (note capitalization!) or cd ~/
% pwd
u
(you)
g
(``g''roup, i.e., everyone in your dept)
o
(``o''ther, i.e., everyone on the box)
a
is shorthand for u and g and o.
% chmod go-rwx answers.txt
When you look at that file with the ls -l
command, it should look like:
% ls -l answers.txt -rwx------ <etc> answers.txt ^^^^^^ there MUST be six dashes here
% chmod go-w sample.dat
% chmod a+r sample.dat
When you look at that file with the ls -l command, it should look like:
% ls -l answers.txt
-rwxr--r-- <etc> answers.txt ^ ^ there MUST be r's here.
likely-new-job-prospects.txt
in your directory. If you don't want random people to see that filename, remove read protections from your directory:
% chmod go-r ~jsmith