LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 01-06-2020, 03:30 PM   #1
Steve R.
Member
 
Registered: Jun 2009
Location: Morehead City, NC
Distribution: Mint 20.3
Posts: 521

Rep: Reputation: 98
Delete File With Broken Symbolic Link


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.
 
Old 01-07-2020, 01:39 PM   #2
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 4,864
Blog Entries: 1

Rep: Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869
Your router might have reduced/simplified toolset, so it might not support every options of GNU find.
 
  


Reply

Tags
bash scripting, symbolic link



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Physical link vs Relative link vs Symbolic link hack3rcon Linux - Newbie 13 01-13-2018 10:48 AM
[SOLVED] Can I make a symbolic link that is dynamic link->$HOME/file? croog Linux - General 4 10-14-2012 07:55 PM
How to create symbolic link to html file and avoid page link problem? haxpor Linux - General 2 01-29-2008 07:40 AM
Can I delete a symbolic link and the file its linked to? mavness Linux - General 4 02-14-2007 01:31 PM
How do I fix a broken Symbolic Link? dickgregory Linux - Newbie 4 11-07-2004 08:08 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:11 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration