[SOLVED] Delete File With Broken Symbolic Link
by Steve R. from LinuxQuestions.org on (#4XGXK)
I moved a large directory to a USB hard drive mounted on my router. I decided, later, to delete it. Turned-out that one file, which had a symbolic link, could not be deleted. I spent some time following the advice here: Delete all broken symbolic links with a line?.
I also ran across this new post that is pretty good: How to Remove (Delete) Symbolic Links in Linux
Unfortunately, none of the advice worked.
As I stared at the the long list of error messages, a thought occurred. I removed the USB hard drive mounted on the router and mounted it on my computer. I was able to immediately delete the file without doing anything fancy.
The implication is that attempting to delete a "broken" file on a network drive may not always be possible given certain situations.


I also ran across this new post that is pretty good: How to Remove (Delete) Symbolic Links in Linux
Unfortunately, none of the advice worked.
As I stared at the the long list of error messages, a thought occurred. I removed the USB hard drive mounted on the router and mounted it on my computer. I was able to immediately delete the file without doing anything fancy.
The implication is that attempting to delete a "broken" file on a network drive may not always be possible given certain situations.