ls(1) - SerenityOS man pages

#Name

ls - list directory contents

#Synopsis

$ ls [options...] [path...]

#Description

ls lists directory contents and attributes.

If no path argument is provided the current working directory is used.

#Options

#Arguments

#Examples

# List contents of working directory
$ ls
# List contents of working directory including hidden dot files
$ ls -la
# List contents of working directory and its subdirectories
$ ls -R
# List contents of /etc/ directory
$ ls /etc
# List contents of /etc/ directory including hidden dot files
$ ls -la /etc

#Notes

Printing raw inode numbers is only possible when listing an entire directory. This happens because the program uses the LibC readdir function, which will provide the raw inode numbers as they're appearing "on disk". In other cases, when strictly using the LibC lstat function the kernel will resolve the inode number with respect to the mount table, so if there is a mounted filesystem on a directory entry, lstat will give the root inode number for that filesystem.

#See also