8
> adb shell
sh-4.1$ ls -F
-F: No such file or directory

-F switch works fine on my Ubuntu.

Why doesn't it work on Android? Is there a way to make it work?

Andrew T.
  • 15,988
  • 10
  • 74
  • 123
Kshitiz Sharma
  • 489
  • 2
  • 5
  • 13

1 Answers1

10

Most shell commands in Android are not GNU versions or a POSIX-compliant implementation, they are either from Toolbox or Busybox and mostly stripped down versions.

A lot of commands in /system/bin are symlinks to /system/toolbox. I haven't found much documentation about it, just the source at https://android.googlesource.com/platform/system/core/+/jb-mr1-release/toolbox/

Busybox is another implementation of several common shell commands, with more commands and features than the default Toolbox. It's used on other embedded systems too, and some bootable GNU/Linux CDs, so you may already be familiar with it. Because it's open-source, there are several installers available on Google Play: just search for "Busybox".

mirabilos
  • 663
  • 8
  • 18
ott--
  • 198
  • 1
  • 3
  • 12
  • There is a guide at https://github.com/jackpal/Android-Terminal-Emulator/wiki/Android-Shell-Command-Reference – Kshitiz Sharma Feb 21 '13 at 13:33
  • 2
    Strictly speaking, GNU userland command tools are not "original", they were designed based on existing Unix command tools and POSIX. – Lie Ryan Feb 22 '13 at 10:48