<<

Summary of commands Table of Contents [] display free disk space. If dirname is omitted, 1. Directory and file commands 1994,1995,1996 Budi Rahardjo ([email protected]) display all available disks. The output maybe This is a summary of UNIX commands available 2. Print-related commands in blocks or in Kbytes. Use df -k in Solaris. on UNIX systems. Depending on the config- uration, some of the commands may be unavailable 3. Miscellaneous commands [dirname] on your site. These commands may be a commer- display disk usage. cial program, or public domain program that 4. management must be installed separately, or probably just not in filename your search . Check your local documentation or 5. archive and compression display filename one screenful. A pager similar manual pages for details (e.g. man program- to (better than) more. 6. Text editors name). This reference card, obviously, cannot de- [dirname] scribe all UNIX commands in details, but instead I 7. programs picked commands that are useful and interesting from list the content of directory dirname. Options: a user’s point of view. 8. Usnet news -a display hidden files, -l display in long format

9. File transfer and remote access dirname Disclaimer directory dirname The author makes no warranty of any kind, expressed 10. X window or implied, including the warranties of merchantabil- more filename 11. , Plot, Image processing tools ity or fitness for a particular purpose, with regard to view file filename one screenfull a the use of commands contained in this reference card. 12. Information systems oldname newname This reference card is provided ”as is”. The author rename file oldname to file newname. If new- shall not be liable for damage in connection with, or 13. Networking programs name is a directory, then move oldname into arising out of the furnishing, performance, or the use directory newname. of these commands or the associated descriptions. 14. Programming tools 15. Text processors, typesetters, and previewers filename Conventions view filename one screenfull at a time (a pager). 16. Spreadsheets bold represents program name 1. Directory and file commands print working directory dirname represents directory name as an argument filename dirname display the content of file filename remove directory dirname (if dirname is empty). filename represents file name as an argument [dirname] file1 [file2 ...] change directory to dirname. If dirname is omit- remove files file1, file2, etc. [dirname] ted, change to your home directory. optional directory name (or other optional - rm - dirname gument) as argument. If it is not given, the source destination remove dirname recursively, removing all files current directory will be used. copy file source into file destination. and subdirectories underneath dirname.

1 2. Print-related commands commandname tar show the location of commandname combine files into one tar file, or extract files lpq [-Pprintername] from a tar file. A tar file could be a device query printer queue of the default printer. If (magnetic tape as /dev/rst0) or a plain file. To who is on-line on this machine printername is given, will query printer printer- extract filename.tar name. tar xvf filename.tar 4. Process management To combine all files under dirname into file- lpr [-Pprintername] filename name.tar: print filename (send filename to the default SIGNUM PID tar cvf filename.tar dirname printer). If printername is given, will send to Send signal SIGNUM to process ID PID, or filename to printername. kill (terminate) process with process ID num- ber PID. For example: lprm [-Pprintername] jobnum uncompress filename.Z remove printing job number jubnum from kill -HUP 5555 filename.Z into its original size and re- printer printername. programname move the .Z extension run program programname with lower priority lpstat (nicer to other users). Recommended for run- check printer status (HP-UX, Solaris 2.x) ning background processes. unarj filename.arj 3. Miscellaneous commands check processes. The options for this command exteract files from an ARJ archive depends on the version and variation of your print or alter environment variables hostname UNIX. Check your local documentation. display name unzip filename.zip show (continuously) what process(es) is run- extract files from filename.zip. The reverse of man topic ning. zip command. display on-line manual on topic. screen 5. File archive and compression create multiple screen with one physical screen. compress filename zip zipname files This program is useful if you have a text- make filename smaller (compression). filename create an archive file (and compress it) called only (e.g. vt100) terminal. Move around with will be replaced by filename.Z ( a .Z extension zipname.zip which contains files. control-A. is added). gunzip filename.gz print system name expand filename.gz into its original (size) MTOOLS and remove the .gz extension. This is GNU un- There is a set of commands to access MS-DOS users zip. display all users on-line disks on systems equipped with floppy disk. gzip filename Most DOS file commands are available (prefixed compress filename with GNU zip (gzip) and add with ’m’): check who is doing what .gz extension mcopy, mdel, mdir, mmd, mtype, etc.

2 6. Text editors 7. Mail Programs scan scan mailbox/folder asWedit [filename] biff HTML editor notify new mail has arrived show show current selected e-mail. axe [filename] read and/or compose e-mail. a simple X window 8. news exmh elvis [filename] X windows mail reader based on MH, see below knews a clone interactive X window-based news reader fastmail [filename] quick batch mail (part of Elm) nn start emacs. A more extensive documentation read news with nn (NoNews is good news.) Can is available on-line. Reference card for GNU from be used to read through NNTP or spool. emacs is also available from FSF GNU emacs list senders of mails in your mailbox nntidy distribution. frm [foldername] cleanup or tidy your .newsrc similar to from but has a better output. If gvim [filename] foldername is present, it will list senders in rn X11 gui version of folder foldername instead your incoming mail- read news with rn. box. This program is distributed as part of the jed [filename] trn elm package. jed text editor threaded rn newsreader mail [userid] xrn joe [filename] read mail. If userid is given in the command a WordStar-like editor line, it will be used in compose mode. After X window-based news reader done, mail will be sent to userid nedit [filename] 9. File transfer and remote access a -based text editor mailtool OpenWindows mail program bftp textedit [filename] OpenWindows text editor batch FTP mush vi [filename] mail user shell. Similar to ftp hostname vi editor Using the ftp prgram to perform FTP to/from mail , but has a better user interface. host hostname. vim [filename] MH package a vi-clone ftptool There are also other e-mail packages, such as X-window (xview) based FTP prgram MH, which come with their own commands. For xedit [filename] example, MH has the following commands (and kermit a simple X window text editor more): send or receive files with kermit protocol. xemacs [filename] inc kermit -sfilename X window Emacs (formerly Lucid Emacs) incorporate mail into inbox folder. to send filename

3 kermit -rfilename mwm ghostview or gv to receive filename Motif window manager a front-end of ghostscript ( gs). minicom olvwm giftrans communication package similar to Procomm OpenLook virtual window manager converts GIF image to transparant GIF. olwm ncftp hostname OpenLook window manager a user-friendly FTP program image processing tool/drawing program with fil- twm ters (plug-ins) to manipulate image. rlogin hostname [-l userid] tab window manager remote login to host hostname. If -l userid is gnuplot given, will login as userid X window programs a freeware plotting program capable of plotting 2D and 3D plots. It supports a wide variety of rsh hostname filemgr output formats. remote shell to host hostname OpenWindows file manager gs ssh [-l login name] hostname [command] xcalc Ghostscript, a PostScript previewer. It can also connect to hostname with ssh (secure shell). If calculator no command is given a shell will be started on be used to convert PostScript into other graphic formats. host hostname. This is similar to but the xclock communication will be encrypted. display clock ps2epsifile.ps [file.epsi] telnet hostname [portnum] create Adobe’s Encapsulated PostScript Inter- xfm change (EPSI) format from a postscript file. connect to hostname with telnet. If portnum file managerX is specified, connect to port portnum. (Usually psselect infile [outfile] portnum is required if you want to connect to xlock select pages from a PostScript file. various services such as IRC or MUD.) lock your screen pstoedit xftp xman converts PostScript to tgif format for editing X-window interface to FTP view/search manual pages rplot xrsh hostname xterm plot 2-D data Open remote shell on host hostname in a new a terminal or shell session xterm window. tgif an X window drawing tool. It can produce var- 10. X windows 11. Graph, Plot, and Image Process- ious output formats, including PostScript. ing Tools Window manager One of the following programs xfig (window managers) is usually started when you coreldraw an X window drawing tool capable of producing login on a Unix workstation, the actual choice start CorelDraw (commercial drawing program) fig output is controlled by your .xsession or .xinitrc file. corelpaint xgraph fvwm2 start Corel Paint program (a commercial paint- a simple X window graphing program able to feeble window manager ing program) produce a bar graph.

4 xloadimage filename rup [hostname] image previewer a WWW browser (X window) with a built in show status of local machines. If hostname is threaded newsreader given, only check that hostname xpaint [filename] X window painting program, undrestands vari- swais useri@hostname ous image format including GIF a text-based WAIS talk to userid at host hostname xv [files] hostname image previewer and manipulation tools for X Tk-based WWW browser tracing IP packet from this host to hostname window. It supports various formats, including userid xarchie GIF, BMP, TIFF, and PostScript. write to userid’s screen/session X-window interface of

12. Information Systems xgopher X-window client 14. Programming tools and shells archie xmosaic sh search the Archie database for anonymous FTP X-window WWW-browser Born again shell. A clone, but better sites bison xwais a GNU implementation of X-window WAIS client X-window WWW-browser which understands cc HTML 3.0. 13. Networking programs chimera CC finger userid@hostname X-window WWW-browser C++ compiler check information of userid at host hostname gopher cpp a Gopher client host domainname C language preprocessor find information about domainname, such as its MX record or IP address csh WWW browser that understands language C-shell irc hypermail Relay Chat, a multi-user chat. Beware, dbx converts mail into HTML addictive! a debugger program dbxtool X window interface to dbx access various libraries on the Internet query information about a specific host through a server. For example you can f77 find IP address of a machine, MX record of a FORTRAN compiler a text-based WWW-browser domain. find [path...] [expression] ping hostname search recursively through directory start- NCSA X window WWW-browser check if host hostname is alive ing from path for files satisfying expression

5 flex 15. Text processors, typesetters, and GNU implementation of print name list of object file previewers

g77 a2ps GNU Fortran compiler Practical Extraction and Reporting Language, converts ASCII to PostScript a powerful programming and scripting language g++ groff GNU C++ compiler prolog GNU *roff gawk a Prolog system gtroff GNU GNU troff rcs gcc resource / gxditview GNU C compiler display gtroff output files under X window. sccs gcl control system ispell filename GNU interactive spelling program gdb stream editor latex filename.tex GNU debugger process filename.tex with LaTeX and generate pattern file(s) sh filename.dvi (a DVI file) Bourne shell search for a string, pattern, or regular expres- lout sion in file(s) tclsh a layout or typesetting program imake Tcl shell, a Tcl interpreter mp C preprocessor interface to the make command. format text, mail, news into a nice PostScript Usually it uses file Imakefile. tcsh tcshell, a csh compatible shell but better output. ksh nroff filename Korn shell tgrind process filename with nroff reformat source code to make it pretty for print- lex out psnup lexical analyzer generator manipulate PostScript file to have n pages on wish lint one side a simple windowing shell, a tk/tcl implementa- verify a C program tion pstops manipulate PostScript files to produce 2-up, 4- macro language processor yacc up, booklet, rotate and many other functions. parsing program generator. Generate C code make from a grammar soffice maintain, update, compile, and regenerate re- StarOffice, a complete Office Suit compatible lated files by a set of rules defined in file Make- zsh with Office, read the manual pages file. Z shell first before you start to use it.

6 filename preview DVI file (filename.dvi) 16. Spreadsheets spell the contents of filename oleo tex filename.tex GNU spreadsheet TeX document processing and typesetting. sc xtem [filename.tex] troff filename spreadsheet calculator a X windows program to control the (La)TeX process filename with troff typesetting cycle, contains extensive helpfiles on xspread xdvi filename.dvi LaTeX commands and syntax. X window version of sc

7