Re: Really stupid use of cleanlinks
On Wednesday 06 August 2003 17:10, Anthony Campbell wrote:
> Never do this!
> I just ran cleanlinks on my root directory; really stupid thing to
> Lots of things were deleted which should not have been and I don't
> know how long it will take to get things back working; only just
> restored ppp. Possibly a new installation will be required?
Now that I came to think about it, the bug report I sent in 
doesn't seem to be quite sufficient.
Currently IMVHO this little script "cleanlinks" better shouldn't exist
at all in its current state, since
a) its handling of (dangling) symlinks is done far better by the
b) its cleaning of empty dirs is actually a simple one-liner
c) it doesn't do what it is supposed to do and thus
d) it can seriously screw up your system
If this script persists I think the following changes should be made:
a) see , somebody better check this for correctness
b) fix Colin's manpage (DIAGNOSTICS), as the message about empty
directories will be printed regardless of the results, and the user
doesn't get feedback about which dirs have been removed
c) or alternatively let it print out the names of removed dirs:
find . -type d -depth -print |
echo \"$i\" empty, removing
rmdir --ignore-fail-on-non-empty $i
What do you think?