cleanlinks is not safe

Asked by Fuzzier

I used cleanlinks to clear dangled symbolic links, but after a 'sudo cleanlinks' at root directory, I lost my gdm and more...
Actually, when I restarted Ubuntu, I was informed that Xserver is nowhere to be found. I then googled the internet and found the problem: cleanlinks removed the symbolic link /usr/X11R6/bin/X (o_O).
But that was not the end of the story. I recreated the symbolic link and restarted gdm, but was told (via a message box) that there's some kind of error. Well, I understood that there would be more errors awaiting, but I'm not an expert. Frustrated, I reinstalled Ubuntu...

Is cleanlinks not safe? Or maybe there're some kind of implicit rules (not in manpage of course) to use this tool?
Thansk.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Fuzzier
Solved:
Last query:
Last reply:
Revision history for this message
Ergosys (ergosys) said :
#1

I dunno, it seems to be (only?) a companion to lndir, and as you have found, not particularly careful in what it does.
In general, any command that you give superuser permissions (via sudo) can do anything it pleases, so any destructive command (rm, mv, etc) can easily threaten the integrity of the system if used wrong.

Revision history for this message
Fuzzier (gauchyler) said :
#2

I googled the internet again, and got a conclusion that cleanlinks is not friendly with Ubuntu.
Why should it remove Xserver sybomlic link? It's not what's said in the manpage.