1834022 Members
2914 Online
110063 Solutions
New Discussion

Unlink the Linked files

 
Virumandi
Frequent Advisor

Unlink the Linked files

Hi.,

We are using ln for creating the Hard-link & Soft link files.

But Is there any specific command to remove the link that we created using ln.

I used to delete the links by using rm command but i want to know is there any specific command for that purpose.


Regards
Suseendran .A
5 REPLIES 5
James R. Ferguson
Acclaimed Contributor

Re: Unlink the Linked files

Hi:

In the shell, 'rm' will remove a link. The underlying system call is 'unlink()'.

Regards!

...JRF...
Peter Godron
Honored Contributor

Re: Unlink the Linked files

Hi,
rm is the command to use, however from man rm:
" If file is a symbolic link, then only the symbolic link is removed.
The file or directory pointed to by the symbolic link is not affected.
If any of the intermediate path components of file happens to be a
symbolic link, then rm follows the symbolic link and removes the file."
Virumandi
Frequent Advisor

Re: Unlink the Linked files

Hi,

Until I am using rm to remove the link files , But I want to know is there any specific command for unlink...

Thanks & Regards
Suseendran .A
Peter Godron
Honored Contributor

Re: Unlink the Linked files

Hi again,
please no points for this second part.

As James refers to it:
man 1m link
"/usr/sbin/link file1 file2
/usr/sbin/unlink file"

Virumandi
Frequent Advisor

Re: Unlink the Linked files

Thanks to all...