Archive for the ‘Linux’ Category
Wednesday, April 11th, 2018
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
Tags: AIX, linux, Recursive, replace, script, string, xargs
Posted in AIX, Linux, Shell Script | No Comments »
Wednesday, October 28th, 2015
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 files, eg under /etc/pam.d, ran this command to disable LDAP authentication and enable “normal” authentication using /etc/shadow:
Continue Reading…
Tags: authconfig, disable, ldap, linux
Posted in Linux | No Comments »
Sunday, September 20th, 2015
– 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
Tags: file, group, lvextend, LVM, pvdisplay, pvscan, redhat, system, vgdisplay, vgscan, volume
Posted in Linux | No Comments »
Saturday, September 20th, 2014
LVM :- Logical Volume Manager and it’s a disk Management for Linux/UNIX Systems.
Tags: AIX, linux, logical, LVM, Manager, unix, volume
Posted in abbreviations and definitions, AIX, Linux, Solaris | No Comments »
Saturday, July 5th, 2014
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.
Continue Reading…
Tags: df, free, hardware, hdaparm, info, inxi, linux, lsblk, lscpu, lshw, lspci, lsscsi, mount
Posted in Linux | No Comments »
Sunday, February 23rd, 2014
you can uncompressed zipping files using java, specially “jar” command:
to do that , try the following :
/usr/java6/bin/jar -xvf /tmp/test.zip
Tags: jar, java, uncompress, zip
Posted in AIX, Linux, Solaris | No Comments »
Saturday, December 21st, 2013
run the following command to know your current run level:
# who -r
run-level 2 2013-12-20 00:39
Tags: AIX, level, linux.unix, os, run, solaris
Posted in AIX, Linux, Operating Systems, Solaris | No Comments »
Saturday, December 21st, 2013
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: raring
Continue Reading…
Tags: debian, linux, release, ubuntu
Posted in Linux | No Comments »
Monday, October 21st, 2013
when you login to the system you get a welcome message which contain information about “Last unsuccessful login” , “Last login” and System Information.
if you need to disable this message, just run the following command :
Continue Reading…
Tags: AIX, hushlogin, last, linux, login, solaris, unsuccessful, welcome
Posted in AIX, Linux, Solaris | No Comments »