Transcription of Linux Command Cheat Sheet Share This Cheat Sheet
1 Linux Command Cheat Sheet |sudo [ Command ]nohup [ Command ]man [ Command ][ Command ] &>> [fileA]> [fileA]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 fileA, preserving existing contentsoutput to fileA, 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 file systemupdate a filesystem, after lvextend*file system check & repair create physical volumemount a filesystemedit disk partitioncreate a logical volumeumount a filesystemchmod -c -Rtouch -a -tchown -c -Rchgrp -c -Rtouch -a -tFile permissionchmod file read, write and executable permissionmodify (or create)
2 File timestampchange file ownershipchange file group permissionmodify (or create) file timestamptr -duniq -c -usplit -lwc -whead -ncut -sdiff -qjoin -imore, lesssort -ncomm -3cat -stail -fFile Utilitiestranslate or delete characterreport or omit repeated linessplit file into piecesprint newline, word, and byte counts for each fileoutput the first part of filesremove section from filefile compare, line by linejoin lines of two files on a common fieldview file content, one page at a timesort lines in text filecompare two sorted files, line by lineconcatenate files to the standard outputoutput last part of the filemkdirrmdirDirectory Utilitiescreate a directoryremove a directoryfindls -a -C -hrm -r -flocate -icp -a -R -idu -sfile -b -imv -f -igrep, egrep, fgrep -i -vFile managementsearch for a filelist content of directoryremove files and directoryfind file.
3 Using updatedb(8) databasecopy files or directorydisk usageidentify the file typemove files or directoryprint lines matching patterntar xvfzgzip, gunzip, zcatuuencode, uudecodezip, unzip -vrpmbzip2, bunzip2rarFile compressioncreate or extract .tar or .tgz filescreate, extract or view .gz filescreate or extract .Z filescreate or extract .ZIP filescreate or extract .rpm filescreate or extract .bz2 filescreate or extract .rar filesexvinanoviewemacssublimesedpicoFile Editorbasic editorvisual editorpico cloneview file 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 trafficopenSSH clientprint routing packet trace to host networkpwd -Pbcexprcalexport` [ Command ]date -d$[variable]
4 Misc Commandsprint current working directoryhigh precision calculatorevaluate expressionprint calenderassign or remove environment variablebackquote, execute commandprint formatted dateif set, access the variableawk, gawktsh" "' 'pythonbashkshphpcsh, tcshperlsource [file]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 file into the current shell, requires the file to be executableCompiled by Alvin KhooShare This Cheat SheetRead the Blog Post