[BusyBox] "ln" with three and more arguments

Pavel Roskin pavel_roskin at geocities.com
Thu Jun 15 20:52:14 UTC 2000


Hello!

Although it is possible to specify three and more arguments after "ln" no
sane person will do it IMHO.

I'm asking because the behavior of "busybox ln" with three arguments is
wildly different from that of GNU ln.

[proskin at sunapee busybox]$ rm -rf a?
[proskin at sunapee busybox]$ ln -s a1 a2 a3
ln: when making multiple links, last argument must be a directory
[proskin at sunapee busybox]$ ./busybox ln -s a1 a2 a3
a3: File exists
[proskin at sunapee busybox]$ ls -l a?
lrwxrwxrwx   1 proskin  proskin         2 Jun 15 16:40 a3 -> a1
[proskin at sunapee busybox]$ rm -rf a?
[proskin at sunapee busybox]$ mkdir a3
[proskin at sunapee busybox]$ ./busybox ln -s a1 a2 a3
a3: File exists
[proskin at sunapee busybox]$ ls -l a3
total 0
[proskin at sunapee busybox]$ ln -s a1 a2 a3
[proskin at sunapee busybox]$ ls -l a3
total 0
lrwxrwxrwx   1 proskin  proskin         2 Jun 15 16:50 a1 -> a1
lrwxrwxrwx   1 proskin  proskin         2 Jun 15 16:50 a2 -> a2

I believe it should be safe to drop support for multiple linking, at least
change the check for the number of arguments and the help message and
leave the real cleaning up for "after release"

Regards,
Pavel Roskin






More information about the busybox mailing list