BashTips
Contents
General
Redirect stdout and stderr:
prog > /dev/null 2>&1
Turn off screen blanking:
setterm -blank
Operate on files with spaces in the names:
find . -maxdepth 1 -print0 | xargs -0 -n1 <command>
Some tar pipes:
(cd $source ; tar cpf - .) | (cd $dest ; tar xvpf -)
tar -C $source -cpf - . | tar -C $dest -xvpf -
tar cf - ~username/ | ssh -l busby redoubt.inside tar xvf
Find all suid programs:
find / -type f -perm +6000 -exec ls -l '{}' \;
