UNIX/LINUX REFERENCE CARD Basic File and Directory Manipulation File Viewing File Text Manipulation File Properties File And
Total Page:16
File Type:pdf, Size:1020Kb
UNIX/LINUX REFERENCE CARD File and Commands Location and Help Scheduling Jobs find ...................................... Locate files sleep ......................... Delay for specified time locate .......................... Locate files via index watch...................Run programs at set intervals Basic File and Directory Manipulation which .............................. Locate commands at ..................................... Schedule a job ls ............................. List directory contents apropos.........Locate commands by keyword lookup cron ................................... Clock daemon cp .......................................... Copy files man ................. Find and display online help page crontab ............... Schedule repeated jobs for cron mv..................................Move/rename files whereis ... Locate bin, src and man files for command expect....Automates tasks using interactive programs rm ....................................... Remove files shred ............................ Destroy data in files ln...........................................Link files File Compression Printing cd...................................Change directory gzip ............... Compress/decompress files (LZ77) lpr ......................................... Print files pwd ................... Print present working directory bzip2..............Compress/decompress files (BWT) lpq ................................. View print queue mkdir ................................. Make directory [un]zip ..... (De-)Compress files (PKZIP compatible) lprm ............................... Remove print jobs rmdir ............................... Remove directory File Comparison and Patching Processes File Viewing diff ........................ Compare files line by line ps ................................... List all processes cat .............. Concatenate files and print to stdout patch ................... Apply changes from a diff file w ................................. List users’ processes more ............................... Page through files comm ............................. Compare sorted files uptime ........................... View system uptime less ............................... Page through files cmp ........................ Compare files byte by byte top.................................Monitor processes nl ............................... Number lines of files md5sum.......Compute and check MD5 message digest xload ............................ Monitor system load od ............... Prints file in octal and other formats kill ............................. Terminate processes nice ............... Run process with modified priority Disks and Filesystems renice ................. Alter running process’ priority File Text Manipulation df ............................... Show free disk space grep ................ Search text for matching patterns mount .......................... Make a disk accessible cut.............Remove sections from each line of files fcsk ........................... Check a disk for errors Hosts paste .............................. Merge lines of files sync .......... Synchronizes filesystem buffers and disk uname ....................... Print system information tr ...................... Translate or delete characters quota ............... Check disk quota for current user hostname ................ Print the system’s hostname join .............. Join lines of files on a common field ifconfig.............Set/display network information split.............................Split file into pieces host....................................Look up DNS csplit ......... Split file into sections by context lines Backups and Remote Storage whois ..................... Look up domain registrants sort ........................................ Sort lines mt................................Control a tape drive ping ... Check reachability and response time of a host uniq ........... Remove duplicate lines from sorted file dump...................................Back up a disk traceroute .............. View network path to a host fmt ..................... Simple optimal text formatter restore .............................. Restore a dump tar ............ Read/write (compressed) tape archives rsync ............................. Mirror a set of files File Editing File Properties dar .................................... Archive a disk vim ....................................... Text editor stat................................Display file status gvim......................Forks a GUI version of ViM wc ........................... Count bytes/words/lines emacs ..................................... Text editor du ................................ Estimate disk usage Environment sed...........................GNU stream text editor file ........................ Manipulate file attributes env ..................... Display environment variables touch ......................... Change file timestamps echo....................................Print variable chown .............................. Change file owner export............Write environment variables (Bash) Spelling Operations chgrp...............................Change file group set .... Write environment variables with more options ispell .................... Check spelling interactively chmod ......................... Change file protections unset .................... Unset environment variables look ................................. Look up spelling Networking Development ssh.....................Securely log into remote hosts cscope ............ Interactively examine a C program scp .................. Securely copy files between hosts gcc........................Compiles C and C++ code sftp ................. Securely copy files between hosts gdb ......................... Debugger for C and C++ wget ............................ Retrieve a url to disk javac.............................Compiles Java code curl ............................ Retrieve a url to disk jdb ................................ Debugger for Java gaim................................Instant messaging awk ......... Pattern scanning and processing language talk ................................ Linux/Unix Chat perl ...................... Perl programming language write .................... Send messages to a terminal python ................ Python programming language mesg.......................Enable/prohibit talk/write ruby.....................Ruby programming language finger ............... Display information about users matlab ................. Technical computing language who.............................Show who is logged in mathematica ....... Mathematical computing language last ............ Displays login and logout information R .............................. Data analysis language Email, News and Web Browsing Encryption pine ......... Terminal-based email and news program pgp .................... Public key encryption program mutt ................... Terminal-based email program gpg..............GnuPG: an encryption tool like PGP mail .............................. Minimal mail client ..........................Text-only web browser links Terminal Emulators firefox ............................ GUI web browser xterm...............Standard terminal emulator for X rxvt ............. Lightweight terminal emulator for X Text Processors and Viewers mrxvt ............... Multi-tab enabled version of rxvt latex ................... Compiles LaTeX → TeX DVI pdflatex....................Compiles LaTeX → PDF Miscellaneous bibtex.........................Compiles BiBTeX files alias ........ Create shorthand for a series commands gv..........................View Postscript/PDF files su ........... Allows you to run a shell as another user xdvi .............................. View TeX DVI files sudo ..... Lets you execute a command as another user dvips...................Prints/converts TeX DVI files nohup............Lets a program run after you log out ps2pdf ................... Converts Postscript → PDF antiword................Converts MS Word → ASCII Image Manipulation/Display xv ................................. Image viewer for X qiv ................ Fast gdk/imlib image viewer for X feh .................... Fast imlib2 image viewer for X display..................ImageMagick: display image convert ................. ImageMagick: convert image This card may be freely distributed under the terms of the GNU identify ........ ImageMagick: display file image info general public licence — This document was compiled by Thiam import....ImageMagick: save screen/window as image H Lee on h2006-12-06i — v0.6 — The author assumes no re- compare ............... ImageMagick: compare images sponsibility for any errors on this card. The latest version can xfig..........................Tool for drawing figures be found at http://www.columbia.edu/~thl2102/. This reference transfig ....... Converts fig → portable LaTeX figure card was adapted from Laurent Gr´egoire’s ViM Quick Reference gimp ............... GNU image manipulation program Card, found at http://tnerual.eriogerg.free.fr/vim.html ..