DELAPARRA
Index
Color
NL
Category: CLI commands

ls

Explained by Updated

What is ls?

ls: List — List files and directories in the current folder. ls lists the files and folders in a directory. ls -l shows details like permissions, owner, size and date, ls -a includes hidden files, and ls -lh shows sizes in a readable form such as 4.2M. Combined options are common: ls -lah gives everything at once. ls -lt sorts by modification time, which quickly shows the newest log or upload.

Definition source Coders Lingo, CC BY 4.0

Frequently asked questions about ls

What should you keep in mind with ls?

The permission column, such as -rw-r--r--, tells you who can read, write or execute a file, which helps when an application cannot write to a folder. For deep folder structures, tree shows the hierarchy, and du -sh * shows which folders take up the most space. These are the first commands to run when you log into an unfamiliar server.

At a glance

CategoryCLI commands
Explained by
Updated

More CLI commands terms

All terms starting with L

Skills

Download all skills (zip)

Manuals

Related services

Need any help?

Stuck on one of these in your own project? Tell me what you are working on and I will tell you how I would approach it.