This document lists and describes 77 common UNIX commands:
1. man and less/cat/more are used to view documentation and files. cd changes directories, ls lists directory contents, and pwd prints the current working directory.
2. grep searches for patterns in files. Commands like sort, uniq, cut, and awk manipulate text. rm and rmdir remove files and directories. chmod changes file permissions.
3. Network commands include ping, netstat, traceroute. Processes are listed and managed using ps, top, kill. System information is shown by commands like uname, df, du. Commands like script, diff analyze and compare files.
This document lists and describes 77 common UNIX commands:
1. man and less/cat/more are used to view documentation and files. cd changes directories, ls lists directory contents, and pwd prints the current working directory.
2. grep searches for patterns in files. Commands like sort, uniq, cut, and awk manipulate text. rm and rmdir remove files and directories. chmod changes file permissions.
3. Network commands include ping, netstat, traceroute. Processes are listed and managed using ps, top, kill. System information is shown by commands like uname, df, du. Commands like script, diff analyze and compare files.
This document lists and describes 77 common UNIX commands:
1. man and less/cat/more are used to view documentation and files. cd changes directories, ls lists directory contents, and pwd prints the current working directory.
2. grep searches for patterns in files. Commands like sort, uniq, cut, and awk manipulate text. rm and rmdir remove files and directories. chmod changes file permissions.
3. Network commands include ping, netstat, traceroute. Processes are listed and managed using ps, top, kill. System information is shown by commands like uname, df, du. Commands like script, diff analyze and compare files.
This document lists and describes 77 common UNIX commands:
1. man and less/cat/more are used to view documentation and files. cd changes directories, ls lists directory contents, and pwd prints the current working directory.
2. grep searches for patterns in files. Commands like sort, uniq, cut, and awk manipulate text. rm and rmdir remove files and directories. chmod changes file permissions.
3. Network commands include ping, netstat, traceroute. Processes are listed and managed using ps, top, kill. System information is shown by commands like uname, df, du. Commands like script, diff analyze and compare files.
Download as DOCX, PDF, TXT or read online from Scribd
Download as docx, pdf, or txt
You are on page 1of 7
` UNIX COMMANDS:
1.man = To know the description for commands.
2.less/cat/more = To open up a file. 3.cd = To go to the home directory. 4.cd \ = To go the base directory. (cd<backslash>) 5.cd .. = To go back a directory. (cd<space>..) 6.ls -lrth = To list a directory. 7.pwd = To show the current path of a directory. 8.id = To list a user id. 9.Gid = To list a group user id. 10.grep = To choose a particular pattern. 11.egrep = To choose multiple patterns. 12.fgrep = To choose out a statment Fast grep.
13.grep -v = To eliminate a String $less 14.grep -w = To choose a exact patterrn.. 15.netstat -na = To display a port id status. 16.traceroute = To check and return the status of a port id with 30 hops/bytes. 17.ps -ef = To list out process in a directory. 18.ps -eLf = To list out process in a directory. 19.top = To list out the process in a server. 20.prstat -a = To list the process in a server. 21.sed = To find and replace characters in a file eg: {sed 's/kumar/dilip/g'} 22.tr -s = To translate a character in a file eg: {tr -s '<' 'K'} 23.sort = To sort out a file.
24.uniq -c = To find the uniq details.
25.cut -d = Used to cut out a character in a file eg: {cut -d ':' -f1,2,3} f1,2,3 substitutes the columns in a file.
26 cut -c = Used to cut a file through the no of characters eg :{cut -c 100-200}
27.iostat -e = Used to find the errors in a server.
28.pcp -p = Used to find the network status.
29.ping = Used to ping a server or a host.s
30.awk = pattern language.
31.echo = To print characters or a space.
32.grep -il = to find out a pattern in a directory eg : {grep -il 'dilip' *1203*}
33.print = Used to print a pattern eg {print $4}.
34.wc -l = Used to count a file or a pattern.
35.bc = used to count no's eg {echo 2+3+5 | bc}
36.kill = Used to kill a process.
37.kill -9 = To force kill a process.
38.cron = To run a command or a script at a particular time.
39.at = To run a command at a time.
40.sighint 1,3,5= To initiate a signal.
41.du -sh = To check the total space.
42.df -h = To check the total free blocks in a server.
43.passwd = To change a password.
44.history -c = To clear history.
45.script {filename} = To store all the things done in a putty untill exit.
46.rm = To remove a file.
47.rmdir = To remove a directory.
48.chmod = To change the mode of a file {read,write,excute}.
49.head = To list out first 10 characters of a file.
50.Tail = To list out head 10 characters of a file.
51.CP = To copy a file.
52.MV = To move or cut a file.
53.Sa = To summarize a accounting information.
54.vmstat = To know the current running processes in a vmware station.
55.!! = To run a previous cmd for eg (!4 would run the last 4th entered cmd)
56.ld = Link editor.
57.w = To know the current user.
58.cmp = To compare a file.
59.xargs = To print up the previous line.
60.Pargs = To know the parent as well as the subprocess running for a particular proccess.
61.NF = To print up the nth field i.e{(asd sda dsad) in this 3 patterns awk '(NF -2) will print sda}.
62.NR = To print up nth row/line .
63.script {filename}= To record in a file whatever done in the putty (eg script dilip, will create a file dilip and start recording whatever done in the putty untill exit.)
64.diff = To differentiate two files.
65.uname = To know the current user of the system as well as the os version.
66.cat > filename= Wiil create a text file .
67.find = find pathname -name "errlg.*" for eg {find /app/logs/spool/ - name "errlg.*" -mtime -10 will print 10 days logs