How to remove symbolic link from directory in Fedora?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
2
down vote

favorite












I was trying to create symbolic link to directory in Fedora.



$ sudo ln -sv $LFS/tools


Then this error occurs.



ln: failed to create symbolic link './tools': File exists


How do I remove symbolic link to that directory







share|improve this question















  • 2




    Have you tried rm?
    – Ignacio Vazquez-Abrams
    Apr 29 at 7:23






  • 1




    Note that when ln says "failed to create symbolic link", it means it did not create a symbolic link. So perhaps there is nothing to remove.
    – telcoM
    Apr 29 at 10:10










  • If a file or directory named "tools" exists in your current working directory, I don't think ln will overwrite it. I think that's what the error message is about. If it does exist and is something you want to replace, you can add the -f option to ln to force it to overwrite the existing file or you can use rm to delete it before running ln again.
    – Joe
    May 4 at 21:18














up vote
2
down vote

favorite












I was trying to create symbolic link to directory in Fedora.



$ sudo ln -sv $LFS/tools


Then this error occurs.



ln: failed to create symbolic link './tools': File exists


How do I remove symbolic link to that directory







share|improve this question















  • 2




    Have you tried rm?
    – Ignacio Vazquez-Abrams
    Apr 29 at 7:23






  • 1




    Note that when ln says "failed to create symbolic link", it means it did not create a symbolic link. So perhaps there is nothing to remove.
    – telcoM
    Apr 29 at 10:10










  • If a file or directory named "tools" exists in your current working directory, I don't think ln will overwrite it. I think that's what the error message is about. If it does exist and is something you want to replace, you can add the -f option to ln to force it to overwrite the existing file or you can use rm to delete it before running ln again.
    – Joe
    May 4 at 21:18












up vote
2
down vote

favorite









up vote
2
down vote

favorite











I was trying to create symbolic link to directory in Fedora.



$ sudo ln -sv $LFS/tools


Then this error occurs.



ln: failed to create symbolic link './tools': File exists


How do I remove symbolic link to that directory







share|improve this question











I was trying to create symbolic link to directory in Fedora.



$ sudo ln -sv $LFS/tools


Then this error occurs.



ln: failed to create symbolic link './tools': File exists


How do I remove symbolic link to that directory









share|improve this question










share|improve this question




share|improve this question









asked Apr 29 at 7:09









Moazzam Tahir

161




161







  • 2




    Have you tried rm?
    – Ignacio Vazquez-Abrams
    Apr 29 at 7:23






  • 1




    Note that when ln says "failed to create symbolic link", it means it did not create a symbolic link. So perhaps there is nothing to remove.
    – telcoM
    Apr 29 at 10:10










  • If a file or directory named "tools" exists in your current working directory, I don't think ln will overwrite it. I think that's what the error message is about. If it does exist and is something you want to replace, you can add the -f option to ln to force it to overwrite the existing file or you can use rm to delete it before running ln again.
    – Joe
    May 4 at 21:18












  • 2




    Have you tried rm?
    – Ignacio Vazquez-Abrams
    Apr 29 at 7:23






  • 1




    Note that when ln says "failed to create symbolic link", it means it did not create a symbolic link. So perhaps there is nothing to remove.
    – telcoM
    Apr 29 at 10:10










  • If a file or directory named "tools" exists in your current working directory, I don't think ln will overwrite it. I think that's what the error message is about. If it does exist and is something you want to replace, you can add the -f option to ln to force it to overwrite the existing file or you can use rm to delete it before running ln again.
    – Joe
    May 4 at 21:18







2




2




Have you tried rm?
– Ignacio Vazquez-Abrams
Apr 29 at 7:23




Have you tried rm?
– Ignacio Vazquez-Abrams
Apr 29 at 7:23




1




1




Note that when ln says "failed to create symbolic link", it means it did not create a symbolic link. So perhaps there is nothing to remove.
– telcoM
Apr 29 at 10:10




Note that when ln says "failed to create symbolic link", it means it did not create a symbolic link. So perhaps there is nothing to remove.
– telcoM
Apr 29 at 10:10












If a file or directory named "tools" exists in your current working directory, I don't think ln will overwrite it. I think that's what the error message is about. If it does exist and is something you want to replace, you can add the -f option to ln to force it to overwrite the existing file or you can use rm to delete it before running ln again.
– Joe
May 4 at 21:18




If a file or directory named "tools" exists in your current working directory, I don't think ln will overwrite it. I think that's what the error message is about. If it does exist and is something you want to replace, you can add the -f option to ln to force it to overwrite the existing file or you can use rm to delete it before running ln again.
– Joe
May 4 at 21:18










1 Answer
1






active

oldest

votes

















up vote
-2
down vote













It is simple
Use rm -rf and that link name of directory
It will forcefully remove the link of that directory






share|improve this answer



















  • 3




    Why would you need to remove a link recursively? That sounds like a recipe for a bad mistake.
    – Ignacio Vazquez-Abrams
    Apr 29 at 8:02






  • 2




    You can also use only rm to delete it
    – Shah Honey
    Apr 29 at 8:04










Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);








 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f440686%2fhow-to-remove-symbolic-link-from-directory-in-fedora%23new-answer', 'question_page');

);

Post as a guest






























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
-2
down vote













It is simple
Use rm -rf and that link name of directory
It will forcefully remove the link of that directory






share|improve this answer



















  • 3




    Why would you need to remove a link recursively? That sounds like a recipe for a bad mistake.
    – Ignacio Vazquez-Abrams
    Apr 29 at 8:02






  • 2




    You can also use only rm to delete it
    – Shah Honey
    Apr 29 at 8:04














up vote
-2
down vote













It is simple
Use rm -rf and that link name of directory
It will forcefully remove the link of that directory






share|improve this answer



















  • 3




    Why would you need to remove a link recursively? That sounds like a recipe for a bad mistake.
    – Ignacio Vazquez-Abrams
    Apr 29 at 8:02






  • 2




    You can also use only rm to delete it
    – Shah Honey
    Apr 29 at 8:04












up vote
-2
down vote










up vote
-2
down vote









It is simple
Use rm -rf and that link name of directory
It will forcefully remove the link of that directory






share|improve this answer















It is simple
Use rm -rf and that link name of directory
It will forcefully remove the link of that directory







share|improve this answer















share|improve this answer



share|improve this answer








edited Apr 29 at 9:42









Hauke Laging

53.2k1282130




53.2k1282130











answered Apr 29 at 7:52









Shah Honey

173




173







  • 3




    Why would you need to remove a link recursively? That sounds like a recipe for a bad mistake.
    – Ignacio Vazquez-Abrams
    Apr 29 at 8:02






  • 2




    You can also use only rm to delete it
    – Shah Honey
    Apr 29 at 8:04












  • 3




    Why would you need to remove a link recursively? That sounds like a recipe for a bad mistake.
    – Ignacio Vazquez-Abrams
    Apr 29 at 8:02






  • 2




    You can also use only rm to delete it
    – Shah Honey
    Apr 29 at 8:04







3




3




Why would you need to remove a link recursively? That sounds like a recipe for a bad mistake.
– Ignacio Vazquez-Abrams
Apr 29 at 8:02




Why would you need to remove a link recursively? That sounds like a recipe for a bad mistake.
– Ignacio Vazquez-Abrams
Apr 29 at 8:02




2




2




You can also use only rm to delete it
– Shah Honey
Apr 29 at 8:04




You can also use only rm to delete it
– Shah Honey
Apr 29 at 8:04












 

draft saved


draft discarded


























 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f440686%2fhow-to-remove-symbolic-link-from-directory-in-fedora%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

How to check contact read email or not when send email to Individual?

Bahrain

Postfix configuration issue with fips on centos 7; mailgun relay