Hi,
Please suggest wipe tool for hp-ux.
Hi,
Please suggest wipe tool for hp-ux.
I would think you could take input from the random pool (is it /dev/urandom on HP-UX?) and dd write it over the block device for the filesystem... do it a few times if paranoid possibly with an intervening /dev/zero wipe. I've been away from HP-UX for a while though... somebody may have a better answer.
I like to use /dev/urandom to feed openssl for wiping a block device. OpenSSL output is much much faster than /dev/urandom.
I use this on Linux but it should also work on HP-UX. I've got some 11.31 servers here I can test it on if it doesn't work for you.
#!/bin/sh
if test $# -ne 1; then
echo "must supply target block device as single argument."
exit 1
fi
if ! [ -b $1 ]; then
echo $1" does not exist, or is not a block special file."
exit 1
fi
read -p "Are you absolutely sure to wipe "$1"? "
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
echo "No wipe"
exit 1
fi
echo
echo "Wiping "$1"..."
openssl enc -aes-256-cbc -pass pass:"$(dd if=/dev/urandom bs=128 count=1
2>/dev/null | base64)" -nosalt < /dev/zero > $1
echo "Done."
exit 0
#EOF