Linux Cheat Sheet Sponsored by Loggly

Preview:

DESCRIPTION

ccc

Citation preview

Linux Command Cheat Sheet|sudo [command]nohup [command]man [command][command] &>> [leA]> [leA]echo -nxargs1>2&fg %Njobsctrl-zBasic commandsPipe (redirect) outputrun < command> in superuser moderun < command> immune to hangup signaldisplay help pages of < command>run < command> and send task to backgroundappend to leA, preserving existing contentsoutput to leA, overwriting contentsdisplay a line of textbuild command line from previous outputRedirect stdout to stderrgo to task Nlist tasksuspend current taskdf -h, -imkfs -t -Vresize2fsfsck -A -Npvcreatemount -a -tfdisk -llvcreateumount -f -vDisk UtilitiesFile system usagecreate le systemupdate a lesystem, after lvextend*le system check & repair create physical volumemount a lesystemedit disk partitioncreate a logical volumeumount a lesystemchmod -c -Rtouch -a -tchown -c -Rchgrp -c -Rtouch -a -tFile permissionchmod le read, write and executable permissionmodify (or create) le timestampchange le ownershipchange le group permissionmodify (or create) le timestamptr -duniq -c -usplit -lwc -whead -ncut -sdi -qjoin -imore, lesssort -ncomm -3cat -stail -fFile Utilitiestranslate or delete characterreport or omit repeated linessplit le into piecesprint newline, word, and byte counts for each leoutput the rst part of lesremove section from lele compare, line by linejoin lines of two les on a common eldview le content, one page at a timesort lines in text lecompare two sorted les, line by lineconcatenate les to the standard outputoutput last part of the lemkdirrmdirDirectory Utilitiescreate a directoryremove a directoryndls -a -C -hrm -r -flocate -icp -a -R -idu -sle -b -imv -f -igrep, egrep, fgrep -i -vFile managementsearch for a lelist content of directoryremove les and directorynd le, using updatedb(8) databasecopy les or directorydisk usageidentify the le typemove les or directoryprint lines matching patterntar xvfzgzip, gunzip, zcatuuencode, uudecodezip, unzip -vrpmbzip2, bunzip2rarFile compressioncreate or extract .tar or .tgz lescreate, extract or view .gz lescreate or extract .Z lescreate or extract .ZIP lescreate or extract .rpm lescreate or extract .bz2 lescreate or extract .rar lesexvinanoviewemacssublimesedpicoFile Editorbasic editorvisual editorpico cloneview le onlyextensible, customizable editoryet another text editorstream editorsimple editorfree -mkillallsensorstopkill -1 -9service [start|stop|restart]ps auxdmesg -kMemory & Processesdisplay free and used system memorystop all process by nameCPU temperaturedisplay current processes, real time monitoringsend signal to processmanage or run sysV init scriptdisplay current processes, snapshotdisplay system messagesnetstat -r -vtelnettcpdumpssh -iping -cNetworkprint network information, routing and connectionsuser interface to the TELNET protocoldump network tracopenSSH clientprint routing packet trace to host networkpwd -Pbcexprcalexport` [command]date -d$[variable]Misc Commandsprint current working directoryhigh precision calculatorevaluate expressionprint calenderassign or remove environment variablebackquote, execute commandprint formatted dateif set, access the variableawk, gawktsh" "' 'pythonbashkshphpcsh, tcshperlsource [le]Scriptingpattern scanningtiny shellanything within double quotes is unchanged except \ and $anything within single quote is unchanged"object-oriented programminglanguage"GNU bourne-again SHellkorn shellgeneral-purpose scripting languageC shellPractical Extraction and Report Languageload any functions le into the current shell, requires the le to be executableCompiled by Alvin KhooShare This Cheat SheetRead the Blog Post bit.ly/Linux-Commands

Recommended