Summary of UNIX Commands- Version 3.2
Total Page:16
File Type:pdf, Size:1020Kb
Summary of UNIX Commands- version 3.2 Disclaimer 8. Usnet news 9. File transfer and remote access Summary of UNIX The author and publisher make no warranty of any 10. X window kind, expressed or implied, including the warranties of 11. Graph, Plot, Image processing tools commands merchantability or fitness for a particular purpose, with regard to the use of commands contained in this 12. Information systems Ó 1994,1995,1996 Budi Rahardjo reference card. This reference card is provided “as is”. 13. Networking programs <[email protected]> The author and publisher shall not be liable for 14. Programming tools damage in connection with, or arising out of the 15. Text processors, typesetters, and This is a summary of UNIX commands furnishing, performance, or the use of these previewers available on most UNIX systems. commands or the associated descriptions. 16. Wordprocessors Depending on the configuration, some of 17. Spreadsheets the commands may be unavailable on your Conventions 18. Databases site. These commands may be a commercial program, freeware or public 1. Directory and file commands bold domain program that must be installed represents program name separately, or probably just not in your bdf search path. Check your local dirname display disk space (HP-UX). See documentation or manual pages for more represents directory name as an also df. details (e.g. man programname). argument cat filename This reference card, obviously, cannot filename display the content of file filename describe all UNIX commands in details, but represents file name as an instead I picked commands that are useful argument cd [dirname] and interesting from a user’s point of view. change directory to dirname. If [dirname] dirname is omitted, change to your Most of the commands described in this optional directory name (or other home directory. reference card are explained in my UNIX optional argument) as argument. If and Internet book which is written in it is no given, current directory will cp source destination “Bahasa Indonesia” )Indonesian language.) be used. copy file source into file destination. Rahardjo, Budi (1994), Buku Pegangan Table of Contents df [dirname] Sistem Unix dan Internet, Bellingham, WA: display free disk space. If dirname OpenPathways, xiv+251pp. Comb-bound, 1. Directory and file commands is omitted, display all available ISBN 1-885130-11-2. 2. Print-related commands disks. The output maybe in blocks 3. Miscellaneous commands or in Kbytes. Use df -k in Solaris 2.x This book is available only by mail order. 4. Process management dtree Send inquiry to Marina Schneider 5. File archive and compression (visually) display directory structure [email protected] 6. Text editors 7. Mail programs du [dirname] Ó 1994,1995,1996 Budi Rahardjo <[email protected]> Summary of UNIX commands - version 3.1 display disk usage. remove dirname recursively, hostname removing all files and subdirectories display host name less filename underneath dirname. display filename one screenful. A man topic pager similar to (better than) more . xless display on-line manual on topic. an X window pager (named after ls [dirname] less) screen list the content of directory create multiple screen with one dirname. Options: 2. Print-related commands physical screen. This program is -a display hidden files useful if you have a text-only (e.g. -l display in long format vt100) terminal. Move around with lp control-A. mkdir dirname print a file (HP-UX, Solaris 2.x) make directory dirname uname lpq [-Pprintername] print system name more filename query printer queue of the default view file filename one screenfull at a printer. If printername is given, will users time query printer printername. (BSD, display all users on-line SunOS, Linux) mv oldname newname w rename file oldname to file lpr [-Pprintername] filename check who is doing what newname. If newname is a print filename (send filename to the directory, then move oldname into default printer). If printername is which commandname directory newname. given, will send to filename to show the location of commandname printername. (BSD, SunOS, Linux) pg filename who view filename one screenfull at lprm [-Pprintername] jobnum who is on-line on this machine atime (a pager). remove printing job number jubnum from printer printername. (BSD, 4. Process management pwd SunOS, Linux) print working directory kill SIGNUM PID Send signal SIGNUM to process ID rmdir dirname lpstat PID, or kill (terminate) process with remove directory dirname (if check printer status (HP-UX, process ID number PID. For dirname is empty). Solaris 2.x) example: rm file1 [file2 ...] 3. Miscellaneous commands kill -HUP 5555 remove files file1, file2, etc. nice programname rm -r dirname env run program programname with print or alter environment variables lower priority (nicer to other users). Ó1994,1995 Budi Rahardjo <[email protected]> Summary of UNIX commands - version 3.1 Recommended for running To combine all files under dirname emacs background processes. into filename.tar: start emacs. A more extensive tar cvf filename.tar dirname documentation is available on-line. ps Reference card for GNU emacs is check processes. The options for uncompress filename.Z also available from FSF GNU emacs this command depends on the expand filename.Z into its original distribution. version and variation of your UNIX. size and remove the .Z extension Check your local documentation. jed unarj filename.arj jed text editor top exteract files from an ARJ archive show (continuously) what joe [filename] process(es) is running. unzip filename.zip a WordStar-like editor extract files from filename.zip. The 5. File archive and compression reverse of zip command. nedit a Motif-based text editor zip zipname files compress filename create an archive file (and compress pico make filename smaller it) called zipname.zip which a simple text editor distributed as (compression). filename will be contains files. part of pine replaced by filename.Z ( a .Z extension is added). MTOOLS sqhm SoftQuad’s HoTMetaL HTML editor. gunzip filename.gz There is a set of commands to access MS- expand filename.gz into its original DOS disks on systems equipped with textedit [filename] form (size) and remove the .gz floppy disk. Most DOS file commands are OpenWindow’s text editor extension. This is GNU unzip. available (prefixed with “m”): mcopy, mdel, vi [filename] mdir, mmd, mtype,etc. gzip filename vi editor compress filename with GNU zip vile [filename] (gzip) and add .gz extension 6. Text editors a vi-clone mt asWedit vim [filename] magnetic tape control program. HTML editor a vi-clone tar axe xcoral combine files into one tar file, or a simple X window text editor a multiwindow X window text editor extract files from a tar file. A tar file that can be used to browse C could be a device (magnetic tape as ee functions and C++ classes. /dev/rst0) or a plain file. easy edit: emacs with a help menu To extract filename.tar elvis xedit tar xvf filename.tar a vi clone a simple X window text editor Ó1994,1995 Budi Rahardjo <[email protected]> Summary of UNIX commands - version 3.1 xemacs notify new mail has arrived (part of nntidy X window Emacs (formerly Lucid elm package) cleanup or tidy your .newsrc Emacs) pine rn 7. Mail Programs mail reader and composer. read news with rn. xwafemail slrn biff X window interface of mail written NNTP-based newsreader (can notify new mail has arrived in wafe+perl. display color ANSI). elm There are also other e-mail packages, such tin read and/or compose e-mail. as MH, which come with their own newsreader fastmail commands. For example, MH has the trn quick batch mail (part of Elm) following commands (and more): threaded rn newsreader from inc xrn list senders of mails in your mailbox incorporate mail into inbox folder. X window-based news reader frm [foldername] scan xvnews similar to from, but has a better scan mailbox/folder Xview-based newsreader output. If foldername is present, it will list senders in folder foldername show xwafenews instead your incoming mailbox. show current selected e-mail. X window-based newsreader written This program is distributed as part in wafe+perl of the elm package. emacs, for example has its own mail reader 9. File transfer and remote mail [userid] M-x rmail and also M-x mh, within emacs access read mail. If userid is given in the window. command line, it will be used in compose mode. After done, mail will bftp be sent to userid 8. Usenet news batch FTP ftp hostname mailtool knews OpenWindows mail program Using the ftp prgram to perform FTP interactive X window-based news to/from host hostname. mush reader mail user shell. Similar to mail, but ftptool nn X-window (xview) based FTP prgram has a better user interface. read news with nn (NoNews is good newmail news.) Can be used to read through kermit NNTP or spool. Ó1994,1995 Budi Rahardjo <[email protected]> Summary of UNIX commands - version 3.1 send or receive files with kermit X-window interface to FTP calculator protovol. kermit -s filename 10. X window xclock to send filename display clock kermit -r filename openwin xfm to receive filename start OpenWindows file manager minicom startx xlock communication package similar to start X window lock your screen Procomm Window manager xodo ncftp hostname The following programs (window managers) odometer, track the distance your a user-friendly FTP program are usually started when you type openwin mouse travel or startx. It is usually in your .xinitrc file. rlogin hostname [-l userid] xterm remote login to host hostname. If -l a terminal or shell session userid is given, will login as userid fvwm feeble window manager rsh hostname 11. Graph, Plot, and Image remote shell to host hostname mwm Processing Tools Motif window manager rz coreldraw receive (upload) files with zmodem olvwm start CorelDraw (commercial OpenLook virtual window manager seyon drawing program) X window communication package olwm corelpaint OpenLook window manager sz [-r] files start Corel Paint program (a send (download) files with zmodem twm commercial painting program) tab window manager telnet hostname [portnum] ghostview connect to hostname with telnet.