ONTAP Discussions

symlinks

Sairajeevmic
789 Views

on one of the share ->user is deleting a folder , but that folder re-appears after sometime.

Is this because it has symlinks ? if yes, how do I verify ?

Can someone help?

1 REPLY 1

wareer
182 Views

On unix Systems:

1.Check symbolic links in UNIX:
List all files and folders in the parent directory to see if the destination folder is symbolically linked. Use the ls -l command to view symbolic link information.

ls -l /path/to/parent-directory

If you see an arrow (->) next to the destination folder, it means it's a symbolic link. For example:

lrwxrwxrwx 1 user group 15 Sep 11 10:00 folder -> /path/to/real-folder

2.To view the symbolic link target:
If the destination folder is a symbolic link, you can use the ls -l command to see the actual path it points to.

ls -l /path/to/symlink

This will show you the actual directory path that the symbolic link points to.

3.Check the mount point:
Make sure the folder is not a mount point. Sometimes mount points cause the contents of the folder to be automatically restored.
mount | grep /path/to/parent-directory
Check the auto-recovery task:
See if there are any automated tasks or scripts, such as cron jobs, that periodically restore the folder.

crontab -l
To view the system logs:
Check the system log files for any actions or errors that might affect the folder deletion.

dmesg | grep <your-folder-name>

On Windows Systems:

1.Use Command Prompt: In Command Prompt, use dir to list directory contents:

dir /aL

 2.If the folder is a symlink and it reappears after deletion, the target directory might be getting restored automatically. You can test by deleting the symlink directly:

rm /path/to/symlink

If the folder is not a symlink, consider other potential causes:

  1. File System Issues: There might be issues with the file system or network share configuration. Check for any file system errors or inconsistencies.

  2. Backup or Synchronization Tools: Verify if there are backup or synchronization tools that might be restoring the folder.

  3. Permissions and Ownership: Ensure that permissions and ownership are set correctly and that no other users or processes are recreating the folder.

Public