jmcgee
June 19th, 2013, 03:25 AM
I want to remove a symlink to a directory, after that I will create another symlink.
I get errors:
mythuser@PVR1:/usr/share/zoneminder$ ls -li
total 48
2876739 drwxr-xr-x 2 root root 4096 Dec 30 15:06 ajax
2876993 lrwxrwxrwx 1 root root 17 Feb 12 2012 cgi-bin -> ../../lib/cgi-bin
2876747 drwxr-xr-x 2 root root 4096 Dec 30 15:06 css
2876697 drwxr-xr-x 2 root root 4096 Dec 30 15:06 db
2876990 lrwxrwxrwx 1 root root 28 Jan 20 10:00 events -> /mnt/raid2/zoneminder/events
2876751 drwxr-xr-x 2 root root 4096 Dec 30 15:06 graphics
2876991 lrwxrwxrwx 1 root root 28 Jan 20 10:01 images -> /mnt/raid2/zoneminder/images
2876755 drwxr-xr-x 2 root root 4096 Dec 30 15:06 includes
2876988 -rw-r--r-- 1 root root 3795 Feb 12 2012 index.php
2876763 drwxr-xr-x 2 root root 4096 Dec 30 15:06 js
2876766 drwxr-xr-x 2 root root 4096 Dec 30 15:06 lang
2876787 drwxr-xr-x 5 root root 4096 Dec 30 15:06 skins
2876989 drwxr-xr-x 2 root root 4096 Feb 12 2012 sounds
2876992 lrwxrwxrwx 1 root root 26 Feb 12 2012 temp -> /var/cache/zoneminder/temp
2876984 drwxr-xr-x 2 root root 4096 Feb 12 2012 tools
2876985 drwxr-xr-x 2 root root 4096 Dec 30 15:06 views
mythuser@PVR1:/usr/share/zoneminder/events$ unlink /mnt/raid2/zoneminder/events
unlink: cannot unlink `/mnt/raid2/zoneminder/events': Is a directory
or
mythuser@PVR1:/usr/share/zoneminder/events$ rm /mnt/raid2/zoneminder/events
rm: cannot remove `/mnt/raid2/zoneminder/events': Is a directory
or
mythuser@PVR1:/usr/share/zoneminder/events$ rmdir /mnt/raid2/zoneminder/events
rmdir: failed to remove `/mnt/raid2/zoneminder/events': Directory not empty
I get errors:
mythuser@PVR1:/usr/share/zoneminder$ ls -li
total 48
2876739 drwxr-xr-x 2 root root 4096 Dec 30 15:06 ajax
2876993 lrwxrwxrwx 1 root root 17 Feb 12 2012 cgi-bin -> ../../lib/cgi-bin
2876747 drwxr-xr-x 2 root root 4096 Dec 30 15:06 css
2876697 drwxr-xr-x 2 root root 4096 Dec 30 15:06 db
2876990 lrwxrwxrwx 1 root root 28 Jan 20 10:00 events -> /mnt/raid2/zoneminder/events
2876751 drwxr-xr-x 2 root root 4096 Dec 30 15:06 graphics
2876991 lrwxrwxrwx 1 root root 28 Jan 20 10:01 images -> /mnt/raid2/zoneminder/images
2876755 drwxr-xr-x 2 root root 4096 Dec 30 15:06 includes
2876988 -rw-r--r-- 1 root root 3795 Feb 12 2012 index.php
2876763 drwxr-xr-x 2 root root 4096 Dec 30 15:06 js
2876766 drwxr-xr-x 2 root root 4096 Dec 30 15:06 lang
2876787 drwxr-xr-x 5 root root 4096 Dec 30 15:06 skins
2876989 drwxr-xr-x 2 root root 4096 Feb 12 2012 sounds
2876992 lrwxrwxrwx 1 root root 26 Feb 12 2012 temp -> /var/cache/zoneminder/temp
2876984 drwxr-xr-x 2 root root 4096 Feb 12 2012 tools
2876985 drwxr-xr-x 2 root root 4096 Dec 30 15:06 views
mythuser@PVR1:/usr/share/zoneminder/events$ unlink /mnt/raid2/zoneminder/events
unlink: cannot unlink `/mnt/raid2/zoneminder/events': Is a directory
or
mythuser@PVR1:/usr/share/zoneminder/events$ rm /mnt/raid2/zoneminder/events
rm: cannot remove `/mnt/raid2/zoneminder/events': Is a directory
or
mythuser@PVR1:/usr/share/zoneminder/events$ rmdir /mnt/raid2/zoneminder/events
rmdir: failed to remove `/mnt/raid2/zoneminder/events': Directory not empty