Busybox, symlinks, and ls behavior

Andrey Falko ma3oxuct at gmail.com
Thu Dec 11 19:16:49 UTC 2008


Hi everyone,

I think I've hit a bug while using busybox, where strange stuff happens with
the output of the ls command. I've tried this on a few distros with busybox
1.9.1 (red hat based) and 1.11.1 (Gentoo) and had the same results.

Here is an example of what I am seeing:

# mkdir test_dir
# touch test_dir/file_a
# touch test_dir/file_b
# busybox ls test_dir > output
# cat output
file_a
file_b
# ln -s test_dir test_sym
# busybox ls test_sym > output
# cat output
test_sym
# busybox ls test_sym
file_a  file_b
# ls test_sym > output
# cat output
file_a
file_b

Why does "busybox ls test_sym > output" not place the correct output into
the "output" file?

I was really hampered by this unexpected behavior when I was using grep like
this:

# busybox ls test_sym | grep file

This always returns nothing under busybox.

Thanks in advance for any help. I apologize if this has already been
discussed or a documented feature somewhere, as you can imagine, its kind of
difficult to google for something like: "busybox ls symlink output". Let me
know if I need to provide a better example of the problem.

Thanks,
Andrey Falko
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.busybox.net/pipermail/busybox/attachments/20081211/0936d20f/attachment-0001.htm 


More information about the busybox mailing list