Quantcast
Channel: How to remove a symbolic link to a directory? - Super User
Browsing latest articles
Browse All 8 View Live

Answer by Anthony Bejarano for How to remove a symbolic link to a directory?

There seems to be a problem with an empty directory with two symlinks. rmdir won't work in Kubuntu 20.10. It answers "directory not empty". rm says it's a directory.

View Article



Answer by isapir for How to remove a symbolic link to a directory?

The issue in the OP is the trailing /, so test5/ throws an error but test5 works.I prefer to use unlink rather than rm as my intention is clearer and there is no chance of mistakenly removing the real...

View Article

Answer by user872812 for How to remove a symbolic link to a directory?

Sometimes if you use autocomplete to name the link that you want to delete you may not see a trailing slash but it's 'half there' and that invisible slash still gives the delete error when trying to...

View Article

Answer by Callum for How to remove a symbolic link to a directory?

You can run removing the trailing slash:$ rm test5This will remove the file (i.e. the symlink).Alternatively you may use unlink:$ unlink test5Again you must omit the trailing slash since you are...

View Article

Answer by pelms for How to remove a symbolic link to a directory?

Try rm test5(without the trailing slash).The slash indicates that 'test5' is a directory whereas it's actually a file linking to a directory.

View Article


Answer by Swanand for How to remove a symbolic link to a directory?

Remove the trailing slash:With prompt:$ rm test5Without prompt:$ rm -f test5

View Article

Answer by bobby for How to remove a symbolic link to a directory?

I feel silly asking, but have you tried rm -r?Since it's a symbolic link it shouldn't delete the target.Edit: Just tried it, it's correctEdit 2: rmdir says in its first line of the man page it deletes...

View Article

How to remove a symbolic link to a directory?

I am using Ubuntu 8.10, Bash and I made a symbolic link with the following command:ln -s ../test5I want to remove it now but my rm fails:rm -Rf test5/rm: cannot remove `test5/`: Not a directoryrm...

View Article

Browsing latest articles
Browse All 8 View Live


Latest Images