You are on page 1of 4

UNIX COMMANDS

1.'ls' command: ls is uesd for listing or long listing


syntax: ls -lrt
2. 'file' commands:
(i).tail command: which is uesd to display the last few lines in the file
syntax: tail -100f filename.log
tail -100f filename.sh
(ii). 'head' command: which is used to display the starting lines of a file
syntax: head -100f filename.log
(iii).'more' command: which display the complete file in percentage wise
syntax: more filename.log
note: if we want see the percentage give the 'space'
3.'bash' command: if we type 'bash' command it will save the all
commands that we will use for future purpose. From next time we need
not retype the commands rather we can use 'up' and'doun' arrows.
Syntax: bash
4.'copy' command: which is used to copy the files from source to target.
syntax: cp -p source target
ex: cp -p a.txt b.txt
we can use the 'back up' command in the using of copy the files
ex: cp -p a.txt a.txt.bak.07022011

5. 'delete' command: to delete a file or a directory.


syntax: rm file/directory rm -r directoryname(for directory)
rm filename.txt(for files only)
rm filename.log( "
)
rm filename.xml( "
)
6. 'diskfree' command: it will display the disk usage of file system
syntax: du -sh *
7.'kill' command: it will kill any services forcebily
syntax: kill -9 processid
8. 'process' command: it will give the process id of any particular service
which is running in background.
syntax: (i). ps -ef|grep -i stringname
ps -ef|grep -i portnumbers
it will give the perticular directory only
ex:

ps -ef|grip -i hawk
ps -ef|grip -i admin

(ii) /usr/ucb/ps -auxwww|grep -i strinname


Here grep is for searching and | (pipe) is use for addding the
servers or combining
this is used to get the id in any background in any directories.
9. 'nohup' command: which is used to run the process in backgroud
syntax: nohup ./anyservice.sh &

10. 'top' command: it will display the entire cpu utilization for a
perticular server.
Syntax: top
11. 'tnsping' command: it will give u the status of database (or) remote
database.
syntax: tnsping databasename
tnsping remotedatabasename
12.'nslookup' command: it will give u the ip-address of any given
servername (or) vip.the vip is also known as servername.
syntax: nslookup servername
ex: nslookup ustu-eaiappdvino1
address: 192.168.116.9
name : ustu-eaiappdvino1.ges.symantic.com
13. 'pwd' command: it will give u the 'present working directory'.
syntax: pwd
14. 'telnet' commnand: it will give u the connectivity b/w the 'source'
and 'destination' servers.
syntax: telnet
15. 'traceroute' command: this command trace the network path of
internet routers. that packet takes as they are forwards from 'your compute'
to destination computer.
ex: traceroute ipaddress
traceroute 198.168.116.9

it is the ip address

16. 'ping' commnad: which is used to ping any specific server name.
syntax: ping servername

17. 'tar' command: it create taparchives and add extract files.


syntax: tar -cvef director.tar dirctorname
ex: tar -cvef abc.tar abc
18. 'zip' command: this is used to 'zip' the directories or folder for this
input file is 'tarfile'.
syntax: gzip director.tar
ex: gzip abc.tar
19. 'crontab' command: is a scheduler which is used to schedule any
job at any time around the year.
syntax: crontab -l (listing the scheduler)
ex:crontab -e (to edit and modify any changes in the
scheduler)

You might also like