0
votes
2answers
1k views

Remove soft link but not the target

I have a directory that contains a link to another directory that I just created. I would like to remove the link but preserve the directory my link was pointing to. How do I do this? > mkdir rgac ...
2
votes
1answer
625 views

Can't delete symbolic links, permission denied

I try to delete all symbolic links pointing to Python3.2 with sudo ls -l . | grep '../Library/Frameworks/Python.framework/Versions/3.2' | awk '{print $9}' | xargs rm This just gives rm: 2to3: ...
12
votes
3answers
5k views

How can I remove all symbolic links with a special target?

With the command: ls -la * I can list all my symbolic links. How can I remove all symbolic links which are linked to a special folder? For example: In my directory usr/local/bin I have the ...
3
votes
4answers
1k views

Accidental deletion of /lib directory in Fedora 15

I accidentally deleted the /lib directory on my Fedora 15 machine and I'm not sure how to go about fixing this. Any help in figuring out how to restore the directory along with symbolic links would be ...
2
votes
2answers
1k views

How to remove the directory a symbolic link links to plus the symbolic link?

Say a is a symbolic link to b. I am looking for a simple command to remove both a and b at once that does not require me to know about b.
0
votes
1answer
420 views

Inconsistency in behavior of 'rm' when a mounted volume is involved?

If I run the following sequence of commands: mkdir dir ln -s dir link rm -r link/ I get this output: rm: cannot remove `link': Not a directory I get the warning because I could simply have ...