![]() |
![]() ![]() |
![]() |
|||||||||
![]() |
![]() |
|
USEFUL BASIC UNIX KNOWLEDGESignals and Systems Group, Uppsala UniversityGeneral Commands find Find files grep Search a file for a pattern sort Sort or merge files bash GNU Bourne-Again SHell.
Process controlps Report process status.
-e Select all processes. -l Show columns flags, state, uid, pid, ppid, cpu, intpri, nice, addr, sz, wchan, tty, time, and comm, in that order. -f Show columns user, pid, ppid, cpu, stime, tty, time, and args, in that order. Look for matlab processes (for example) only:
Options: -9
Kill hard (can not be ignored by the process).
Kill process 6135 (given by ps
for example):
Disk stuffls List contents of directories.
-l List in long format, giving mode, number of links, owner, group, size in bytes, and time of last modification for each file -a List all entries; usually entries whose names begin with a period (.) are not listed.
-R Copy recursive (needed if you want to copy directories). du Summarize disk usage.
du -s * | sort -n
Viewing text filesmore Veiw text files in a terminal window.less Less is a program similar to more, but which allows backward movement in the file as well as forward movement. Viewing manual pagesman Find manual information about unix commands. Example: man emacs, shows the manual pages for the emacs text editor.info For reading Info documents about unix commands. Uses a simple menu driven text interface. Example: info emacs FTPftp File transfer program.gftp X Windows frontend to ftp.
Mathmatlabxmaple
Text Pocessingemacs GNU project Emacs.xemacs latex/tex Structured text formatting and typesetting. Graphic Toolsxv A multi-format image displayer for X Windows. Good for saving screen dumps in different formats etc.gimp The General Image Manipulation Program (like Photoshop). xfig Facility for Interactive Generation of figures. Printinglpr Off line print.
-Pprinter Note 1: If you want to cancel a printer job goto: http://signserv.signal.uu.se Note 2: To set the default printer add export PRINTER=floor2@signserv to your .bashrc file (type ls -a in your home dir if you can't find it). Note 3: If you have a PS-file and want higher quality when printing on the color printer color2, try adding the following lines at the beginning (in the %% part) of the ps-file : %%BeginFeature: *MediaType Glossy <</InputAttributes
<<
%%BeginFeature: *OutputMode HighQuality <</PostRenderingEnhance
true
PostScriptViewing PostScript filesgv -fg black -bg white file.ps &
-fg
Foreground color.
Text to PostScript Conversiona2ps file.txt > file.ps
-1
single page mode.
Example: convert all m-files in a directory to PostScript and put them in a single ps-file.
Put n-pages on one pagempage Print multiple pages (text or PostScript) per sheet on a PostScript printer or to a file.psnup -2 a_file.ps a_file2.ps
-n n-pages (PostScript) on each page.
Hint: Good if you wan't put several PostScript slides (overheads) on one page to hand out
to students.
|