[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Busybox rm follows links



On Sun Nov 07, 1999 at 01:36:57AM +0100, Marcel Harkema wrote:
>   Hi,
> 
>   The 'rm' command of busybox follows links... this probably isn't a
>   feature? :)
> 
>   Cheers,
> 
>          Marcel

Hmm.  I'm not seeing the problem.

Using busybox:
    [andersen@dillweed busybox]$ ./busybox touch foo
    [andersen@dillweed busybox]$ ./busybox ln -s foo symlink
    [andersen@dillweed busybox]$ ./busybox ls -l foo symlink
    -rw-r--r--   1 1000      1000            0 Nov  7 21:15 foo
    lrwxrwxrwx   1 1000      1000            3 Nov  7 21:15 symlink -> foo
    [andersen@dillweed busybox]$ ./busybox rm symlink
    [andersen@dillweed busybox]$ ./busybox ls -l foo symlink
    -rw-r--r--   1 1000      1000            0 Nov  7 21:15 foo
    symlink: No such file or directory

Using the usual GNU tools:
    [andersen@dillweed busybox]$ touch foo
    [andersen@dillweed busybox]$ ln -s foo symlink
    [andersen@dillweed busybox]$ ls -l foo symlink
    -rw-rw-r--    1 andersen andersen        0 Nov  7 21:19 foo
    lrwxrwxrwx    1 andersen andersen        3 Nov  7 21:19 symlink -> foo
    [andersen@dillweed busybox]$ rm symlink
    [andersen@dillweed busybox]$ ls -l foo symlink
    /bin/ls: symlink: No such file or directory
    -rw-rw-r--    1 andersen andersen        0 Nov  7 21:19 foo

i.e. same thing. You seem to imply that somehow 'rm symlink' would
unlink 'foo', but that doesn't seem to be the case. Could you give me an
example which shows the problem?

 -Erik

--
Erik B. Andersen   Web:    http://www.xmission.com/~andersen/ 
                   email:  andersee@debian.org
--This message was written using 73% post-consumer electrons--

Attachment: pgpn3xTyAn8Hu.pgp
Description: PGP signature


Reply to: