November 2024
M T W T F S S
 123
45678910
11121314151617
18192021222324
252627282930  

Categories

November 2024
M T W T F S S
 123
45678910
11121314151617
18192021222324
252627282930  

Link commands

delete symbolic link

When using the rm or unlink command to remove a symbolic link to a directory, make sure you don’t end the target with a ‘/’ character because it will create an error. Example:

$ mkdir dirtest
$ ln -s dirtest lntest
$ rm lntest/
rm cannot remove directory ‘lntest/’ : Is a directory
$ unlink lntest/
unlink: cannot unlink ‘lntest/’: Not a directory
$ unlink lntest

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>