Search This Blog

Thursday, May 21, 2009

Linux Command

Below are the few linux command which frequently use by DBA in day to day work.

1. Copy command

$cp -irf source directory target directory

2. size

$du -sh direcotry name

3. Remove the diretory & subdirectory

$rm -irf directoryname

4. Move the files from one directory to another directory

mv -irf sourcedirectory targetdirectory

5. Change ownership on directory or subdirectory

$chown -R user:group directory

6. Find file in the linux system

$find -name eg: find /data1/PROD/ -name apichecb.pls

1. directory name where we want to search the file.

2. file name is which we want to search

7. How to check "File" type in linux

$file filename


[appluat@FAKORAAPPS forms]$ file collect_30324

collect_30324: ASCII text

8. how to check linux version
I.$uname -a (with kernal version)

[root@FAKORAAPPS ~]# uname -aLinux FAKORAAPPS.xxxxxxxx.local 2.6.18-53.el5PAE #1 SMP Wed Oct 10 16:48:18 EDT 2007 i686 i686 i386 GNU/Linux

II.[root@FAKORAAPPS /]# cat /proc/versionLinux version 2.6.18-53.el5PAE ( (gcc version 4.1.2 20070626 (Red Hat 4.1.2-14)) #1 SMP Wed Oct 10 16:48:18 EDT 2007

III.[root@FAKORAAPPS /]# cat /etc/redhat-releaseRed Hat Enterprise Linux Server release 5.1 (Tikanga)

8. how to check group information in the linux

$cat /etc/group

9. how to check user information like group and etc..

10. how to install RPM package

#rpm -ivch packagename

i stand for install

11. change to usb filesystem type from ntfs to ext3

#mke2fs -j /dev/sdb1
then mount the usbfirst check the usb filesystem type

#fdisk -l then use the below command to mount

#mount /dev/sdb1 /mnt/usb

1 comment:

Anonymous said...

mm. love this thoughts )