Posts

Showing posts from January, 2015

Solaris Tips

Remove files with names Containing special characters The answer is by using inode number root @ sys-082 # ls -laLi 42 total     594061 -rw-r - r-- 1 root root 21 January 1599 11:08 -lrt     594.049 drwxrwxrwx 2 root root 1024 January 21 12:17.          2107 drwxrwxrwx root root 10752 January 20 7:04 p.m. ..     594.057 -rwxr-xr-x 1 root root 389 21 January 12:17 1passive.sh     594.051 -rwxr-xr-x 1 root root 391 21 January 12:18 2passive.sh     594.050 -rwxr-xr-x 1 root root 382 Nov 25 09:00 alarm.sh     594.055 -rwxr-xr-x 1 root root 211 1 November 24:11 alm.js     594.053 -rwxr-xr-x 1 root root 375 November 25 9:00 ne.sh     594.056 -rwxr-xr-x 1 root root 331 1 November 24:11 ne1.js     594054 -rwxr-xr-x 1 root root 20 November 1 24:11 passive.js root @ sys-082 # find. -inum 594061 -exec ls -lrt {} \; -rw-r - r-- 1 root root 21 January 1...

LVM Tips

Fixing LVM Metadata   [root@AD2-vMotion ~]# pvdisplay    Couldn't find device with uuid Wvadzv-E4hK-mel4-wgYQ-C1CX-66I7-q42j0C.   --- Physical volume ---   PV Name               /dev/sdc1   VG Name               vg   PV Size               200.00 GiB / not usable 1.34 MiB   Allocatable           yes   PE Size               4.00 MiB   Total PE              51199   Free PE               15871   Allocated PE          35328   PV UUID               SgYnka-WnfI-YiaO-TxUZ-wpv5-y3sC-R26sGF     --- Physical volume ---   PV Name               unknown device   VG Name ...

Editing File Tips

To change <text> in a list of files perl -pi -e 's/<text>/<replacement text>/g' files*.txt For example perl -pi -e 's/system\.sysLocation\.0\ \=\ \"India\"/system\.sysLocation\.0\ \=\ \"Kerala\"/g' snmp.walk