HP-UX Porting and Archive Centre

July 27th, 2016

This is the HP-UX Porting and Archive Center - pre-built packages for HP-UX 11i

Exclude directory from find . command

July 27th, 2016

Single Directory:

find . -path ./misc -prune -o -name '*.txt' -print

Multiple Directories:

find . -type d \( -path dir1 -o -path dir2 -o -path dir3 \) -prune -o -print

Find directories that DON'T contain a file

July 27th, 2016

Exact file:

find base_dir -mindepth 2 -maxdepth 2 -type d '!' -exec test -e "{}/cover.jpg" ';' -print

Multiple Extensions:

find base_dir -mindepth 2 -maxdepth 2 -type d '!' -exec sh -c 'ls -1 "{}"|egrep -i -q "^cover\.(jpg|png)$"' ';' -print

tar/gzip and gunzip/untar in the same pipe

July 27th, 2016

tar/gzip

tar cvf - files_to_tar | gzip > tarfile.tar.gz

gunzip/untar

gzip -d < tarfile.tar.gz | tar xvf -

2013 Mustang Information

May 19th, 2016