I did:
ln -s /DATA/ ./base_DATA/
and I'd like to unlink. Simply:
unlink ./base_DATA
but... unlink: cannot unlink './base_DATA': Is a directory
According to this answer (and many other online) the problem is usually the trailing space in the unlink command. But I get this error regardless.
Any ideas how to tackle this?
unlinkis not the opposite ofls -s. It is basically same asrm(in this case.rmhas more powers.). – ctrl-alt-delor Jun 07 '18 at 09:56lnthen consider using the-tand-Toption. They are designed to make the arguments tocp,mv, andlnunambiguous. – ctrl-alt-delor Jun 07 '18 at 09:58rm -rdelete the contents of linked diretory? – alex Jun 07 '18 at 09:59rm -rwill remove a directory and everything in it. It will also remove a single file (including a symlink).rmcan also take a list of filenames.unlinkexcepts one filename, and only removes single files. Note: nether delete, they remove/unlink directory entries. If a file has zero references (no entry in any directory, no open files), then it is deleted. – ctrl-alt-delor Jun 07 '18 at 10:05