On 5/4/06, jhuniepi <[EMAIL PROTECTED]> wrote:
i created a symlink as root in a dir test. that symlink is owned by
root.root. but the target directory is owned by cj.cj. why do rm
cannot remove a symlink?
i want to remove it so that i can create one as user cj.
is there something that i missed?

TIA

here's the output of my commands

[EMAIL PROTECTED] test]# ls -la
total 12
drwxr-xr-x   2 root root 4096 May  4 14:01 .
drwxr-x---  24 root root 4096 May  4 13:56 ..
lrwxrwxrwx   1 root root   21 May  4 14:00 symlink -> /home/cj/symlink/dir/
[EMAIL PROTECTED] test]# rm symlink/
rm: cannot remove directory `symlink/': Is a directory

When you have a symlink pointing to a directory, adding the trailing
slash will treat the symlink like its target (the directory). Without
it, you actually touch the symlink and not the target. See the
attached typescript session.

--
JM Ibanez --

The worst government is often the most moral. One composed of cynics
is often very tolerant and humane. But when fanatics are on top there
is no limit to oppression.
   -- H. L. Mencken

-----
http://www.livejournal.com/~jmibanez/
http://www.mycgiserver.com/~butiki/

Attachment: typescript
Description: Binary data

_________________________________________________
Philippine Linux Users' Group (PLUG) Mailing List
[email protected] (#PLUG @ irc.free.net.ph)
Read the Guidelines: http://linux.org.ph/lists
Searchable Archives: http://archives.free.net.ph

Reply via email to