Wednesday, May 7, 2014

Day today used Linux Command

When I  used to worked in LINUX environment,I had to use following commands in Day today Life :)


cd         Change Directory    ex : cd /tmp
mkdir   Make Directory        ex : mkdir -p /u01/app
which      Show the full path  ex :Which java
cp        Copy a file         ex :cp /tmp/init.ora . 
mv      Move file             ex :mv  /tmp/init.ora  /u01/app/oracle/product/10.2.0/dbhome_1/dbs
scp     Secure Copy         ex :scp oracle@192.9.220.110:/tmp/spfileORCL.ora   /u01/app/oracle/product    /10.2.0/dbhome_1/dbs
ll  /ls    list down all files and direcotries in the current location        ex : ll -a /ls -s /ll -la
man        list down all the possible parameters                              ex : man cp   
id        listdown the group,sub groups and user id will be displayed.    ex :id oracle                   
exit    exit from the terminal
find    find a file from specific location          ex :-find / -name "init.ora"
useradd     add an user      ex :  useradd -m -u 501 -g dba -G software  -c "Oracle Software Owner" oracle
groupadd       add a group       ex :groupadd -g 502 dba
vi /vim   text editors which can be used to format plain text files       ex  :  vi abc.txt
cat     concatinate and print the output of the file                               ex  : cat abc.txt
fsck    check and repai a Linux file system                                       ex :  fsck
df -h     storage(disk space) usage will be seen                                ex :  df -kh
ps    -ef list down the process                                                         ex :  ps -ef
fdisk  partition table  details shown                                                 ex : fdisk /dev/sda1
mount  Check mounted device to the server                                    ex :mount 
umount  unmount the
touch     create an empty file                                                          ex : touch abcd.txt
 tail / head   read a file  from  end of file or top of the file               ex :tail -f
 chmod  change the mod  of the file (read/write/execute for user/group/other  ex : chmod -R 777 /oracle/app
 chown     change the owner of the file                                           ex :chown -R oracle:dba  /u01/app/
 chkconfig  update and queries for runlevels                                  ex :- chkconfig --list iptables 
 date    Print/Set the date and time of the server
 echo     Display line of text                                                           ex :echo $ORACLE_HOME
 export export the values                                                              ex : export ORACLE_HOME
 kill      kill a process with process id                                             ex :  kill 1512
 gzip     zip a file
 tar      unzip a file                                                                         ex :-  tar -xvf abc
 rpm      redhat package manager                                                  ex :-  rpm -i gcc4.1.1.rpm
 netstat    shows the port details of the server                               ex :- netstat -a     
 nslookup    Query Internet domain service
 passwd        set/change password for users                                  ex :- passwd oracle
 pwd        print present working directory
 init0/shutdown power off the system
 init6/reboot    reboot  the system      
 sleep             delaying the system
 sudo             execute the command as another user   
 uname            show the kernal version                                       ex :- uname -a    
 userdel        delete a user account
 who am I        show who is logged in
 wc             Word Count
 ln            create links (softlinks)  ex :- ln -s  /media/RHEL6   /tmp       
 clear        clear the terminal Window
 dmesg  print kernel and driver message
 eject        eject the CDROM
 hostname    show the hostname
 history    show the history of the command you executed.
 ifconfig     Configure Network Interface

No comments:

Post a Comment