2012年12月11日 星期二

Remove or unlink the symbolic link

1. What ??
General I often to use the unlink to remove the symbolic links,
but when there are many links file in a folder,
is there any of quick method to do that ??



2. Solution:
A. Write a batch to unlink the symbolic link.

B. Use rm when there are no any physical files in this
rm reference
      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.
Reference: How to Unlink all files in a directory?

沒有留言:

張貼留言