HP-UX

File System shows 100% occupied but du tells different and still has Unused Spaces.

We have faced an issue as below mentioned – found /oracle mount-point showing 100% as Used. But getting different size values for folders under /oracle mount-point, when we executed du -gs . bash-4.4# df -gFilesystem GB blocks Free %Used Iused %Iused Mounted on/dev/hd4 4.00 1.39 66% 20686 6% //dev/hd2 4.00 1.02 75% 45679 16% /usr/dev/hd9var […]

File System shows 100% occupied but du tells different and still has Unused Spaces. Read More »

How to Find Server Public IP Address in Linux Terminal

root@test:/var/log/nginx# wget -qO – icanhazip.comwww.xxx.yyy.zzzroot@test:/var/log/nginx# wget -qO- http://ipecho.net/plain | xargs echowww.xxx.yyy.zzzroot@test:/var/log/nginx# wget -qO – icanhazip.comwww.xxx.yyy.zzzroot@test:/var/log/nginx# curl icanhazip.comwww.xxx.yyy.zzzroot@test:/var/log/nginx#

How to Find Server Public IP Address in Linux Terminal Read More »

sed to play with data or parsing your text

To select all the lines starting from STARTING_PATTERN up to  blank line ^$ and then delete those lines. # sed ‘/STARTING_PATTERN/,/^$/d’ filename To edit files in place, use -i option. # sed -i ‘/STARTING_PATTER/,/^$/d’ filename Insert multiple lines into a file after specified pattern. # sed ‘/cdef/r add.txt’ input.txt # sed ‘/cdef/r add.txt’ input.txt input.txt:abcdaccdcdeflineweb

sed to play with data or parsing your text Read More »

How to Rescan new LUN’s added in Linux, HP-UX, Aix, Solaris ?

HP-UX 1. Rescan the devices: ioscan -fnC <disk|tape> 2. Generate device files:  insf -e 3. Verify the new devices:  ioscan -funC <disk|tape> AIX 1. Rescan the devices ):  cfgmgr -vl fcsx Where x is FC adapter number 2. Verify the new devices:  lsdev -Cc <disk|tape> Linux The rescan in Linux is HBA-specific. For QLogic: echo

How to Rescan new LUN’s added in Linux, HP-UX, Aix, Solaris ? Read More »

How to configure Proxy Settings for the Unix / Linux Console

You can use the following methods to configure your console to use a proxy server so that console based programs like wget could get connect to the internet through the proxy. 1 – Set the environment variable # export http_proxy=http://DOMAIN\USERNAME:PASSWORD@SERVER:PORT/ # export ftp_proxy=http://DOMAIN\USERNAME:PASSWORD@SERVER:PORT/ In the above configuration you can ommit the DOMAIN\USERNAME:PASSWORD@ part if you

How to configure Proxy Settings for the Unix / Linux Console Read More »

unzip a bunch of files linux

  bash-3.2# ls *.zip 118666-47.zip  120830-06.zip  138852-01.zip  142394-01.zip  147217-02.zip 118777-16.zip  120849-04.zip  139520-02.zip  142933-05.zip  148027-03.zip 119081-25.zip  124204-04.zip  142240-01.zip  143506-06.zip 119963-24.zip  126425-01.zip  142251-02.zip  146470-08.zip bash-3.2# bash-3.2# Problem : bash-3.2# unzip *.zip Archive:  118666-47.zip caution: filename not matched:  118777-16.zip caution: filename not matched:  119081-25.zip caution: filename not matched:  119963-24.zip caution: filename not matched:  120830-06.zip caution: filename not matched: 

unzip a bunch of files linux Read More »

Delete Files Older Than x Days on Linux / Unix

The find utility on linux allows you to pass in a bunch of interesting arguments, including one to execute another command on each file. We’ll use this in order to figure out what files are older than a certain number of days, and then use the rm command to delete them. Command Syntax find /path/to/files* -mtime

Delete Files Older Than x Days on Linux / Unix Read More »

Scroll to Top