Category Archives: Linux

Recursively replacing a string in all files in a directory

You can use the following command to change Specific string on all files under specific directory: find /u01/directory -type f | xargs perl -pi~ -e ‘s/oldtext/newtext/g;’ Tested on Linux & AIX Ref: https://blogs.oracle.com/rammenon/recursively-replacing-a-string-in-all-files-in-a-directory-linux

How to disable LDAP Authentication in Linux

After a customer had performed some bad edits on various LDAP configuration files, users were locked out and unable to access the system. Root could still login however. I logged in as root, and rather than mess with various config … Continue reading

Useful Commands for Redhat LVM and increasing Filesystem

– Scan New Hardware: scsi-rescan rescan-scsi-bus.sh –forcerescan – For Physical Volumes: pvdisplay pvscan pvcreate /dev/sdb – For Volume Groups: vgdisplay vgscan vgextend VGNAME PVNAME lvextend -L+50G LVNAME resize2fs LVNAME

LVM

LVM :- Logical Volume Manager and it’s a disk Management for Linux/UNIX Systems.

How To Check Linux Hardware Info

lscpu Reports info about the cpu and processing units. lshw Reports detailed/brief info about multiple hardware units like cpu, memory, disk, network adapters etc.

uncompress files using jar command

you can uncompressed zipping files using java, specially “jar” command:   to do that , try the following :   /usr/java6/bin/jar -xvf /tmp/test.zip

run levels description

The Following points shows the meaning of each run level : on LINUX-UBUTNU/DEBIAN: 0 – halt 1 – single user 2 – multiuser (default) 3 – same as 2 4 – same as 2 5 – same as 2 6 … Continue reading

how to know current run level

run the following command to know your current run level: # who -r run-level 2 2013-12-20 00:39

how to know your operating system release

if you want to get your operating system relase you have 2 ways to do that: First: you can run the following command: # lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 13.04 Release: 13.04 Codename: … Continue reading