Hp Ux Cheat Sheet

UNIX cheat sheet

Find/Zip/Move/Delete files older than x days
find ./ -name “*.ARC” -mtime +1 -exec ls -l {} ;
find ./ -name “*.ARC” -mtime +1 -exec ls -l {} ;

find ./ -name “*.ARC” -mtime +1 -exec rm {} ;
find ./ -name “*.ARC” -mtime +1 -exec rm {} ;

HP-UX:- To get a list of adapters:-HP-UX 10.x uses the Network management IDs #lanscan -n HP-UX 11.x uses the PPA numbers. Unix Cheat Sheet. DISCLAIMER: Please. Table1RevisionHistory(continued) PublicationDate EditionNo. DocumentManufacturingPart OperatingSystemsSupported Number B2355-90810 HP-UX11.00,11iv1,11iv1.5,11iv1.6 11 June2003.

find ./ -name “*.ARC” -mtime +1 -exec gzip {} ;
find ./ -name “*.ARC” -mtime +1 -exec gzip {} ;

find ./ -name “*.arch” -mtime +1 -exec mv {} /u01/andy/;
find ./ -name “*.arch” -mtime +1 -exec mv {} /u01/andy/;

Delete the 500 oldest files
rm -f `ls -tr|head -500`
rm -f `ls -tr|head -500`

Previous Post 5 Useful Solaris Unix Administration Cheat Sheets Next Post HP-UX: ICAP Quick How To. Leave a Reply Cancel reply. Your email address will not be published. HP-UX Cheat Sheet # System Information; HP-UX Cheat sheet #1 Kernel; Exporting putty settings; HP-UX TAR tricks & tips; SAP Automatically restart backgroung jobs; SAP Table Partitioning; HP UX NFS Restart; Disable root SSH login HP-UX Linux; shell script - awk tips; HP-UX Checking the status of multipathing in 11iv3.

Find and grep
find ./ -grep {} ; -print 2>/dev/null
find ./ -grep {} ; -print 2>/dev/null

Or…

find ./ -exec grep -l “string” {} ;
find ./ -exec grep -l “string” {} ;

list all files opened by a process
lsof -p
lsof -p

ls -l sorted by size
ls -l |sort -k 5
ls -l |sort -k 5

du -sk *|sort -n
du -sk *|sort -n

cpio unzip syntax
cpio -idmv <
cpio -idmv <

man commands
man -k -displays the chapters containing the specified
man -shows the page
man -k -displays the chapters containing the specified
man -shows the page

pipes
mknod p
mknod p

Turn off auto indent and bracket matching in vi
:set noai nosm
:set noai nosm

Capture a control charater
ctl-v then press the control key (eg. backspace)

Configure ksh environment
To display the current settings

Hp Ux Commands Cheat Sheet

set -o
set -o

To set HP/UX stylee…

set -o vi
set -o vi-esccomplete
set -o vi
set -o vi-esccomplete

Show routing tables
netstat -r
netstat -r

Hp Ux Cheat Sheet

Sheet

Hp-ux Lvm Cheat Sheet

Check all logs for ORA- errors
grep ^ORA- *log |cut -f2 -d”-“|cut -f1 -d:|awk ‘{print “ORA-” $1}’|sort -u