LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 06-16-2020, 03:18 AM   #1
CollieJim
Member
 
Registered: Mar 2005
Distribution: Gentoo, Kubuntu
Posts: 582

Rep: Reputation: 28
stop rm following links


When I try to use rm to delete a soft link, it wants to delete the target directory.

How do I stop that?

Last edited by CollieJim; 06-16-2020 at 03:31 AM.
 
Old 06-16-2020, 04:09 AM   #2
ehartman
Senior Member
 
Registered: Jul 2007
Location: Delft, The Netherlands
Distribution: Slackware
Posts: 1,674

Rep: Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888
Quote:
Originally Posted by CollieJim View Post
When I try to use rm to delete a soft link, it wants to delete the target directory.
Don't use a trailing /
So "rm link_file" will remove the link itself, but "rm link-file/" will try to remove what it is pointing TO.
 
  


Reply



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
actually while debugging an assembly language i have got the following error can any body figure out how i can rectify the following error niranjan1609 Linux - Newbie 3 06-03-2018 05:21 PM
i use the following way to install vlc in cent os but i got the following error praveenkalam Linux - Software 6 12-21-2009 03:49 AM
web page/links links/links vendtagain Linux - Newbie 2 09-19-2009 08:13 PM
cifs not following links deVas Linux - Networking 0 09-16-2005 03:54 AM
links (hard links and soft links..) sachitha Programming 1 08-10-2005 12:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 02:30 AM.

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