Anda di halaman 1dari 6

Command aproposwhatis mantascii|ps2pdf>ascii.pdf whichcommand timecommand timecat dirnavigation cd cd (cddir&&command) pushd.

filesearching aliasl='lslcolor=auto'

Description Showcommandspertinenttostring.Seealso threadsafe makeapdfofamanualpage Showfullpathnameofcommand Seehowlongacommandtakes Startstopwatch.Ctrldtostop.Seealsosw Gotopreviousdirectory Goto$HOMEdirectory Gotodir,executecommandandreturntocurrent dir Putcurrentdironstacksoyoucanpopdbackto it

quickdirlisting Listfilesbydate.Seealsonewestand lslrt find_mm_yyyy ls/usr/bin|prT9W$COLUMNS Printin9columnstowidthofterminal Search'expr'inthisdirandbelow.Seealso findname'*.[ch]'|xargsgrepE'expr' findrepo Searchallregularfilesfor'example'inthisdir findtypefprint0|xargsr0grepF'example' andbelow findmaxdepth1typef|xargsgrepF'example' Searchallregularfilesfor'example'inthisdir Processeachitemwithmultiplecommands(in findmaxdepth1typed|whilereaddirdoecho$direchocmd2done whileloop) findtypef!perm444 Findfilesnotreadablebyall(usefulforwebsite) Finddirsnotaccessiblebyall(usefulforweb findtyped!perm111 site) Searchcachedindexfornames.Thisreislike locater'file[^/]*\.txt' glob*file*.txt lookreference Quicklysearch(sorted)dictionaryforprefix Highlightoccurancesofregularexpressionin grepcolorreference/usr/share/dict/words dictionary archivesandcompression gpgcfile Encryptfile gpgfile.gpg Decryptfile tarcdir/|bzip2>dir.tar.bz2 Makecompressedarchiveofdir/ bzip2dcdir.tar.bz2|tarx tarcdir/|gzip|gpgc|sshuser@remote'ddof=dir.tar.gz.gpg' finddir/name'*.txt'|tarcfilesfrom=|bzip2>dir_txt.tar.bz2 finddir/name'*.txt'|xargscpatargetdirectory=dir_txt/parents (tarc/dir/to/copy)|(cd/where/to/&&tarxp) (cd/dir/to/copy&&tarc.)|(cd/where/to/&&tarxp) (tarc/dir/to/copy)|sshCuser@remote'cd/where/to/&&tarxp' Extractarchive(usegzipinsteadofbzip2for tar.gzfiles) Makeencryptedarchiveofdir/onremote machine Makearchiveofsubsetofdir/andbelow Makecopyofsubsetofdir/andbelow Copy(withpermissions)copy/dirto/where/to/ dir Copy(withpermissions)contentsofcopy/dirto /where/to/ Copy(withpermissions)copy/dirto remote:/where/to/dir

ddbs=1Mif=/dev/sda|gzip|sshuser@remote'ddof=sda.gz' rsync(Networkefficientfilecopier:Usethedryrunoptionfortesting) rsyncPrsync://rsync.server.com/path/to/filefile rsyncbwlimit=1000fromfiletofile rsyncazesshdelete~/public_html/remote.com:'~/public_html' rsyncauzesshremote:/dir/.&&rsyncauzessh.remote:/dir/ ssh(SecureSHell) ssh$USER@$HOSTcommand sshfY$USER@$HOSTNAMExeyes scppr$USER@$HOST:filedir/ scpcarcfour$USER@$LANHOST:bigfile sshgL8080:localhost:80root@$HOST sshR1434:imap:143root@$HOST sshcopyid$USER@$HOST wget(multipurposedownloadtool)

Backupharddisktoremotemachine Onlygetdiffs.Domultipletimesfor troublesomedownloads Locallycopywithratelimit.It'slikeniceforI/O Mirrorwebsite(usingcompressionand encryption) Synchronizecurrentdirectorywithremoteone Runcommandon$HOSTas$USER(default command=shell) RunGUIcommandon$HOSTNAMEas$USER Copywithpermissionsto$USER'shome directoryon$HOST UsefastercryptoforlocalLAN.Thismight saturateGigE Forwardconnectionsto$HOSTNAME:8080out to$HOST:80 Forwardconnectionsfrom$HOST:1434into imap:143 Installpublickeyfor$USER@$HOSTfor passwordlesslogin

Storelocalbrowsableversionofapagetothe currentdir Continuedownloadingapartiallydownloaded wgetchttp://www.example.com/large.file file wgetrndnpl1A'*.jpg'http://www.example.com/dir/ Downloadasetoffilestothecurrentdirectory wgetftp://remote/file[19].iso/ FTPsupportsglobbingdirectly wgetqOhttp://www.pixelbeat.org/timeline.html|grep'ahref'|head Processoutputdirectly echo'wgeturl'|at01:00 Downloadurlat1AMtocurrentdir Doalowprioritydownload(limitto20KB/sin wgetlimitrate=20kurl thiscase) wgetnvspiderforcehtmlibookmarks.html Checklinksinafile Efficientlyupdatealocalcopyofasite(handy wgetmirrorhttp://www.example.com/ fromcron) networking(Noteifconfig,route,miitool,nslookupcommandsareobsolete) ethtooleth0 Showstatusofethernetinterfaceeth0 ethtoolchangeeth0autonegoffspeed100duplexfull Manuallysetethernetinterfacespeed iwconfigeth1 Showstatusofwirelessinterfaceeth1 iwconfigeth1rate1Mb/sfixed Manuallysetwirelessinterfacespeed iwlistscan Listwirelessnetworksinrange iplinkshow Listnetworkinterfaces iplinksetdeveth0namewan Renameinterfaceeth0towan iplinksetdeveth0up Bringinterfaceeth0up(ordown) ipaddrshow Listaddressesforinterfaces ipaddradd1.2.3.4/24brd+deveth0 Add(ordel)ipandmask(255.255.255.0) iprouteshow Listroutingtable iprouteadddefaultvia1.2.3.254 Setdefaultgatewayto1.2.3.254 hostpixelbeat.org LookupDNSipaddressfornameorviceversa Lookuplocalipaddress(equivalenttohost hostnamei `hostname`) whoispixelbeat.org Lookupwhoisinfoforhostnameoripaddress netstattupl Listinternetservicesonasystem (cddir/&&wgetndpHEKkhttp://www.pixelbeat.org/cmdline.html)

netstattup Listactiveconnectionsto/fromsystem windowsnetworking(Notesambaisthepackagethatprovidesallthiswindowsspecificnetworkingsupport) smbtree Findwindowsmachines.Seealsofindsmb Findthewindows(netbios)nameassociatedwith nmblookupA1.2.3.4 ipaddress smbclientLwindows_box Listsharesonwindowsmachineorsambaserver mounttsmbfsofmask=666,guest//windows_box/share/mnt/share Mountawindowsshare Sendpopuptowindowsmachine(offbydefault echo'message'|smbclientMwindows_box inXPsp2) textmanipulation(Notesedusesstdinandstdout.Newerversionssupportinplaceeditingwiththeioption) sed's/string1/string2/g' Replacestring1withstring2 sed's/\(.*\)1/\12/g' Modifyanystring1toanystring2 sed'/*#/d/^*$/d' Removecommentsandblanklines sed':a/\\$/Ns/\\\n//ta' Concatenatelineswithtrailing\ sed's/[\t]*$//' Removetrailingspacesfromlines Escapeshellmetacharactersactivewithindouble sed's/\([`"$\]\)/\\\1/g' quotes seq10|sed"s/^//s/*\(.\{7,\}\)/\1/" Rightalignnumbers sedn'1000{pq}' Print1000thline sedn'10,20p20q' Printlines10to20 sedn's/.*<title>\(.*\)<\/title>.*/\1/ipTq' ExtracttitlefromHTMLwebpage sedi42d~/.ssh/known_hosts Deleteaparticularline sortt.k1,1nk2,2nk3,3nk4,4n SortIPV4ipaddresses echo'Test'|tr'[:lower:]''[:upper:]' Caseconversion trdc'[:print:]'</dev/urandom Filternonprintablecharacters trs'[:blank:]''\t'</proc/diskstats|cutf4 cutfieldsseparatedbyblanks history|wcl Countlines setoperations(NoteyoucanexportLANG=Cforspeed.Alsotheseassumenoduplicatelineswithinafile) sortfile1file2|uniq Unionofunsortedfiles sortfile1file2|uniqd Intersectionofunsortedfiles sortfile1file1file2|uniqu Differenceofunsortedfiles sortfile1file2|uniqu SymmetricDifferenceofunsortedfiles joint'\0'a1a2file1file2 Unionofsortedfiles joint'\0'file1file2 Intersectionofsortedfiles joint'\0'v2file1file2 Differenceofsortedfiles SymmetricDifferenceofsortedfiles joint'\0'v1v2file1file2 math echo'(1+sqrt(5))/2'|bcl seqf'4/%g'1299999|pastesd+|bcl Quickmath(Calculate).Seealsobc Calculatetheunixway Morecomplex(int)e.g.ThisshowsmaxFastE echo'pad=20min=64(100*10^6)/((pad+min)*8)'|bc packetrate echo'pad=20min=64print(100E6)/((pad+min)*8)'|python Pythonhandlesscientificnotation echo'pad=20plot[64:1518](100*10**6)/((pad+x)*8)'|gnuplotpersist PlotFastEpacketratevspacketsize echo'obase=16ibase=1064206'|bc Baseconversion(decimaltohexadecimal) Baseconversion(hextodec)((shellarithmetic echo$((0x2dec)) expansion)) unitst'100m/9.58s''miles/hour' Unitconversion(metrictoimperial) unitst'500GB''GiB' Unitconversion(SItoIECprefixes) unitst'1googol' Definitionlookup Addacolumnofnumbers.Seealsoaddand seq100|(tr'\n'+echo0)|bc funcpy calendar cal3 Displayacalendar

cal91752 datedfri [$(dated'12:00+1day'+%d)='01']||exit datedate='25Dec'+%A

datedate='@2147483647' TZ='America/Los_Angeles'date datedate='TZ="America/Los_Angeles"09:00nextFri' locales printf"%'d\n"1234 BLOCK_SIZE=\'1lsl echo"Ilivein`localeterritory`" LANG=en_IE.utf8localeint_prefix localekc$(locale|sedn's/\(LC_.\{4,\}\)=.*/\1/p')|less recode(Obsoletesiconv,dos2unix,unix2dos) recodel|less recodewindows1252..file_to_change.txt recodeutf8/CRLF..file_to_change.txt recodeiso885915..utf8file_to_change.txt recode../b64<file.txt>file.b64 recode/qp..<file.qp>file.txt recode..HTML<file.txt>file.html recodelfwindows1252|grepeuro echon0x80|recodelatin9/x1..dump

Displayacalendarforaparticularmonthyear Whatdateisitthisfriday.Seealsoday exitascriptunlessit'sthelastdayofthemonth Whatdaydoesxmasfallon,thisyear Convertsecondssincetheepoch(19700101 UTC)todate WhattimeisitonwestcoastofUS(usetzselect tofindTZ) What'sthelocaltimefor9AMnextFridayon westcoastUS Printnumberwiththousandsgrouping appropriatetolocale Uselocalethousandsgroupinginls.Seealsol Extractinfofromlocaledatabase Lookuplocaleinfoforspecificcountry.Seealso ccodes Listfieldsavailableinlocaledatabase Showavailableconversions(aliasesoneachline) Windows"ansi"tolocalcharset(autodoesCRLF conversion) Windowsutf8tolocalcharset Latin9(westerneurope)toutf8 Base64encode Quotedprintabledecode TexttoHTML Lookuptableofcharacters Showwhatacoderepresentsinlatin9charmap Showlatin9encoding Showutf8encoding Savecopyofdatacdrom Createcdromimagefromcontentsofdir Mountthecdromimageat/mnt/dir(readonly) ClearaCDRW Burncdromimage(usedev=ATAPIscanbusto confirmdev) RipaudiotracksfromCDtowavfilesincurrent dir MakeaudioCDfromallwavsincurrentdir(see alsocdrdao) Makeoggfilefromwavfile Showfilesbysize,biggestlast Showtopdiskusersincurrentdir.Seealsodutop Sortpathsbyeasytointerpretdiskusage Showfreespaceonmountedfilesystems Showfreeinodesonmountedfilesystems Showdiskspartitionssizesandtypes(runas root) Listallpackagesbyinstalledsize(Bytes)onrpm

echon0x20AC|recodeucs2/x2..latin9/x echon0x20AC|recodeucs2/x2..utf8/x CDs gzip</dev/cdrom>cdrom.iso.gz mkisofsVLABELrdir|gzip>cdrom.iso.gz mountoloopcdrom.iso/mnt/dir cdrecordvdev=/dev/cdromblank=fast gzipdccdrom.iso.gz|cdrecordvdev=/dev/cdrom cdparanoiaB cdrecordvdev=/dev/cdromaudiopad*.wav oggenctracknum='track'track.cdda.wavo'track.ogg' diskspace(SeealsoFSlint) lslSr dus*|sortk1,1rn|head duhs/home/*|sortk1,1h dfh dfi fdiskl rpmqaqf'%10{SIZE}\t%{NAME}\n'|sortk1,1n

dpkgqueryWf='${InstalledSize10}\t${Package}\n'|sortk1,1n ddbs=1seek=2TBif=/dev/nullof=ext3.test >file monitoring/debugging tailf/var/log/messages stracecls>/dev/null stracefeopenls>/dev/null stracefetrace=writeewrite=1,2ls>/dev/null ltracefegetenvls>/dev/null lsofp$$ lsof~

distros Listallpackagesbyinstalledsize(KBytes)on debdistros Createalargetestfile(takingnospace).Seealso truncate truncatedataoffileorcreateanemptyfile Monitormessagesinalogfile Summarise/profilesystemcallsmadeby command Listsystemcallsmadebycommand Monitorwhat'swrittentostdoutandstderr Listlibrarycallsmadebycommand Listpathsthatprocessidhasopen Listprocessesthathavespecifiedpathopen Shownetworktrafficexceptssh.Seealso tcpdump_not_me Listprocessesinahierarchy Listprocessesby%cpuusage Listprocessesbymem(KB)usage.Seealso ps_mem.py Listallthreadsforaparticularprocess ListelapsedwalltimeforparticularprocessIDs Showsystemreboothistory Showamountof(remaining)RAM(mdisplays inMB) Watchchangeabledatacontinuously Monitorudeveventstohelpconfigurerules Showkernelversionandsystemarchitecture Shownameandversionofdistribution Showallpartitionsregisteredonthesystem ShowRAMtotalseenbythesystem ShowCPU(s)info ShowPCIinfo ShowUSBinfo Listmountedfilesystemsonthesystem(and alignoutput) Showstateofcellsinlaptopbattery DisplaySMBIOS/DMIinformation Howlonghasthisdisk(system)beenpoweredon intotal Showinfoaboutdisksda Doareadspeedtestondisksda Testforunreadableblocksondisksda Lineeditorusedbybash,python,bc,gnuplot,... Virtualterminalswithdetachcapability,... Powerfulfilemanagerthatcanbrowserpm,tar, ftp,ssh,... Interactive/scriptablegraphing Webbrowser openafileorurlwiththeregistereddesktop

tcpdumpnotport22 pseopid,argsforest pseopcpu,cpu,nice,state,cputime,argssortpcpu|sed'/^0.0/d' pseorss=,args=|sortbk1,1n|prTW$COLUMNS psCfirefoxbinLopid,tid,pcpu,state psp1,$$oetime= lastreboot freem watchn.1'cat/proc/interrupts' udevadmmonitor systeminformation(seealsosysinfo)('#'meansrootaccessisrequired) unamea headn1/etc/issue cat/proc/partitions grepMemTotal/proc/meminfo grep"modelname"/proc/cpuinfo lspcitv lsusbtv mount|columnt grepFcapacity:/proc/acpi/battery/BAT0/info # dmidecodeq|less # smartctlA/dev/sda|grepPower_On_Hours # hdparmi/dev/sda # hdparmtT/dev/sda # badblockss/dev/sda interactive(seealsolinuxkeyboardshortcuts) readline screen mc gnuplot links xdgopen.

application

Jan72008[Comments]|[Addlinkto...]|
AdsbyGoogle

73

Linux

LinuxLiveCD

RedHatLinux

UbuntuLinuxSystem

Anda mungkin juga menyukai