In my terminal app when I type ls /?
it gives me ls /d
. Where can I find the other options? For example I want to list the file attributes and file length. I have tried also busybox to no avail.
2 Answers
It sounds like you want the extremely common
ls -l
For reference, the complete busybox help for ls:
BusyBox v1.21.0-Stericson (2013-01-28 21:49:55 GMT) multi-call binary.
Usage: ls [-1AaCxdLHRFplinsehrSXvctu] [-w WIDTH] [FILE]...
List directory contents
-1 One column output
-a Include entries which start with .
-A Like -a, but exclude . and ..
-C List by columns
-x List by lines
-d List directory entries instead of contents
-L Follow symlinks
-H Follow symlinks on command line
-R Recurse
-p Append / to dir entries
-F Append indicator (one of */=@|) to entries
-l Long listing format
-i List inode numbers
-n List numeric UIDs and GIDs instead of names
-s List allocated blocks
-e List full date and time
-h List sizes in human readable format (1K 243M 2G)
-r Sort in reverse order
-S Sort by size
-X Sort by extension
-v Sort by version
-c With -l: sort by ctime
-t With -l: sort by mtime
-u With -l: sort by atime
-w N Assume the terminal is N columns wide
--color[={always,never,auto}] Control coloring
-
Solved! It was 2 ls installed and I deleted the one linked to toolbox. But what is toolbox? Commented Jun 26, 2013 at 8:37
-
Probably it is the phone vendor's custom version of busybox. Or it could be anything. Commented Jun 26, 2013 at 13:06
I would generally not expect /?
to provide meaningful output, because it's really a DOS/Windows thing. Linux/Unix command option are typically passed with hyphens, either a single one for short flags (for example, ls -l
) or two hyphens for verbose ones (e.g. --help
). Two possibilities that you can try:
- If you're using a version provided by
busybox
, you can usebusybox ls --help
. Doing this without the call tobusybox
at the front of the command may not yield any results (e.g. CyanogenMod just responds withunknown option '--'
if I tryls --help
). - The Linux man page for
ls
is readily available online. The options there are probably not all implemented in the Android binary, but it will give you a bit of an overview. You can also check the man page forbusybox
, which has all of the commands it implements as well as the options they support. I am not sure if the Android version implements all the same commands/options, but it very well may.
-
-
The help can be omitted from a
busybox
build. When omitted, you can't get help/usage information from busybox commands. Commented Jun 26, 2013 at 0:35
/?
is a Windows/DOS thing. It generally has no meaning under Linux/Unix. Ifls
on Android provides a help page it's probablyls --help
(as it is on a desktop Linux distro).busybox ls --help
.