Edit: Uploaded new version of scripts. Changed output format to cope better with long lines (mavrothal ). See post below.
1) 'lswhiteout'
This script lists all ordinary ".wh." files, along with the file they cover (if it exists), and the layer in which the hidden file was found.
Example output:
Code: Select all
# ./lswhiteout
Whiteout files in /initrd/mnt/dev_save/puppy/tahr/tahrsave
/.wh.pinstall.sh
covers /pinstall.sh
in devx_tahr_6.0.2.sfs
Code: Select all
# ./lswhiteout -q
/.wh.pinstall.sh
covers /pinstall.sh
in devx_tahr_6.0.2.sfs
This is a clean-up script that removes all ordinary ".wh." files that don't cover any file in a lower layer. So they don't actually do anything in the current system, but can cause problems in the future if the file they are supposed to cover gets re-introduced into a lower layer.
Example output:
Code: Select all
# ./rmdeadwhiteout
Searching whiteout files...
/root/.wh.zxzx.txt
removed from /initrd/mnt/dev_save/puppy/tahr/tahrsave
Note: Both these scripts contain a 'find' command which can take a while to complete, so they each output a header line before the 'find' starts, to reassure the user that the script is functioning.
To use:
Dwonload the appropriate ".gz" file and move it to the directory you want to contain the utility.
Then gunzip the downloaded file.
gyro