ls

The command that lists the files and directories inside a directory.

In more detail

Useful options: -a includes names starting with a dot, -l shows permissions, owner, size and date, -1 prints one name per line, -F marks directories with a slash and executables with a star, and -d describes a directory itself rather than its contents. Its output is for people; scripts should use globbing or find instead of parsing it.

Examples

ls -F project
ls -la ~
ls -a
ls .git/refs/heads

Related terms

Taught in

References

Certification courses