ls (target)
List directory contents (POSIX, toybox)
Syntax:
ls [-1ACFHLNRSZabcdfghiklmnopqrstuwx] [--color[=auto]] [-ll --full-time][file...]
Runs on:
QNX OS
Options:
- -1
- (
One
) List one file per line. - -A
- List all files but . (dot) and .. (dot dot).
- -a
- List all files, including hidden ones i.e., those that start with a dot (
.
). - -b
- Display escapes for nongraphic characters.
- -C
- Display multiple-column output, with entries sorted vertically in columns.
- -c
- For sorting (-t) or printing (-l), use the time of last change to the file's status information (ctime) instead of time of last modification of the file itself.
- --color[=auto]
- Color the output based on file type. The colors for each file type are seen in the
following table:
File type Color Device Yellow Directory Blue Executable files (.exe files) Green Socket Purple Sticky directory Greenback SUID Red SUID File Red background Symbolic Link Turquoise/red - -d
- Treat directories like files; give information on the directory itself, not on the files or subdirectories it contains.
- -F
- Indicate the filetype by adding an extra character after some pathnames, as follows:
Character Meaning /
Directories *
Executable files (.exe files) |
FIFOs (named pipes) @
Symbolic links (QNX OS extension) - -f
- Output is not sorted.
- -g
- Like -l ("el") but don't list owner.
- -H
- Follow command line symlinks.
- -h
- With -l and -s, print human readable sizes.
- -i
- For each file, print the file's inode number.
- -L
- Follow symbolic links.
- -l
- ("el") List files in long format. This option provides most of the relevant file information.
- -ll --full-time
- List files in long format with nanoseconds.
- -m
- Fill the width with a comma-separated list of entries.
- -N
- No escaping, even on tty.
- -n
- Like -l ("el") except display numeric user and group IDs.
- -o
- Like -l ("el") but don't display group information.
- -p
- Put a forward slash (
/
) after directory names. - -q
- Force print filename characters that aren't included in the character set classification in the current locale to be displayed as a question mark (?).
- -R
- Recursively list all subdirectories encountered.
- -r
- Reverse the order of the sort to get either oldest files first (if files are being sorted by time) or reverse collating sequence.
- -S
- Sort by file size.
- -s
- Display the size of storage used in 512-byte blocks.
- -t
- Sort by time modified (most recently modified first).
- -u
- Use access time for timestamps.
- -w
- Set column width.
- -x
- List entries by columns (sort horizontally).
- -Z
- Display any security context of each file.
- file
- The pathname of a file to be listed. If the file specified isn't found, a diagnostic message is output on standard error. Files are displayed in command-line sequence.
Description:
The ls utility displays file names and information requested on files.
This utility is provided as part of the toybox package. For information on how to enable it, see toybox.
Contributing author:
Rob Landley and the toybox project (see https://landley.net/toybox/).
Page updated: