Unix

Published on July 2020 | Categories: Documents | Downloads: 8 | Comments: 0 | Views: 146
of 3
Download PDF   Embed   Report

Comments

Content

 

Unix/Linux Command Reference File Commands 1. ls Directory listing 2. ls -al Formatted listing with hidden fles 3. ls -lt Sorting the Formatted listing by time modifcation 4. cd dir Change directory to dir 5. cd Change to home directory 6. wd Show c!rrent wor"ing directory #. m"dir dir Creating a directory dir $. cat %fle &laces the standard in!t into the fle '. more fle (!t!t the contents o) the fle 1*. head fle (!t!t the frst 1* lines o) the fle 11. tail fle (!t!t the last 1* lines o) the fle 12. tail -) fle (!t!t the contents o) fle as it grows+starting with the last 1* lines 13. to!ch fle Create or !date fle 14. rm fle Deleting the fle 15. rm -r dir Deleting the directory 16. rm -) fle Force to remo,e the fle 1#. rm -r) dir Force to remo,e the directory dir 1$. c fle1 fle2 Coy the contents o) fle1 to fle2 1'. c -r dir1 dir2 Coy dir1 to dir2create dir2 i) not resent 2*. m, fle1 fle2 ename or mo,e fle1 to fle2+i) fle2 is an e/isting directory 21. ln -s fle lin" Create symbolic symbolic lin" lin" to fle

&rocess management 1. s 0o dislay the c!rrently wor"ing rocesses 2. to Dislay all r!nning rocess Unix/Linux Command Reference

3. "ill id ill the rocess with gi,en id 4. "illall roc ill all the rocess named roc 5. "ill attern ill "ill all rocesses matching the attern 6. bg ist stoed or bac"gro!nd obs+res!me a stoed  ob in the bac"gro!nd bac"gro!nd #. )g rings the most recent ob to )oregro!nd $. )g n rings ob n to the )oregro!nd

File  ermission ermission 1. chmod octal fle Change the ermission o) fle to octal+which can be )o!nd searately )or !ser+gro!+world by adding+ •



4-readr7 2-writew7

 



1-e/ec!te/7

Searching 1. gre attern fle Search )or attern in fle 2. gre -r attern dir Search rec!rsi,ely )or attern in dir 3. command 8 gre attern Search attern in the o!t!t o) a command 4. locate fle Find all instances o) fle 5. fnd . -name flename Searches in the c!rrent directory reresented by a eriod7 and below it+ )or fles and directories with names starting with flename 6. gre attern Searches )or all the named rocesses + that matches with the attern and+ by de)a!lt+ ret!rns their 9D

System 9n)o 1. date Show the c!rrent date and time 2. cal Show this month:s calender 3. !time Show c!rrent !time 4. w Dislay who is on line 5. whoami ho yo! are logged in as Unix/Linux Command Reference

6. fnger !ser Dislay in)ormation abo!t !ser #. !name -a Show "ernel in)ormation $. cat ;roc;c!in)o C! in)ormation '. cat roc;memin)o <emory in)ormation 1*. man command Show the man!al )or command 11. d) Show the dis" !sage 12. d! Show directory sace !sage 13. )ree Show memory and swa !sage 14. whereis a Show ossible locations o) a 15. which a Show which alications will be r!n by de)a!lt

Comression 1. 2. 3. 4. 5. 6. #. $.

tar c) fle.tar fle Create tar named fle.tar containing fle tar /) fle.tar =/tract the fles )rom fle.tar tar c>) fle.tar.g> fles Create a tar with ?>i comression tar />) fle.tar.g> =/tract a tar !sing ?>i tar c) fle.tar.b>2 Create tar with >i2 comression tar /) fle.tar.b>2 =/tract a tar !sing >i2 g>i fle Comresses fle and renames it to fle.g> g>i -d fle.g> Decomresses fle.g> bac" to fle

@etwor" 1. ing host &ing host and o!t!t res!lts 2. whois domain ?et whois in)ormation )or domains

 

3. dig domain ?et D@S in)ormation )or domain 4. dig -/ host e,erse loo"! host 5. wget fle Download fle 6. wget -c fle Contin!e a stoed download Unix/Linux Command Reference

Shortc!ts 1. ctrlAc Balts the c!rrent command 2. ctrlA> Stos the c!rrent command+ res!me with )g in the )oregro!nd or bg in the bac"gro!nd 3. ctrlAd ogo!t the c!rrent session+ similar to e/it 4. ctrlAw =rases one word in the c!rrent line 5. ctrlA! =rases the whole line 6. ctrlAr 0ye to bring ! a recent command #.  eeats the last command $. e/it ogo!t the c!rrent session Unix/Linux Command Reference

Sponsor Documents

Or use your account on DocShare.tips

Hide

Forgot your password?

Or register your new account on DocShare.tips

Hide

Lost your password? Please enter your email address. You will receive a link to create a new password.

Back to log-in

Close