ls

Practice ls from memory. ls with no flags lists names of non-hidden entries in the current directory in column form. Add -l for details, -a to in

List files and directories in the current location.

ls

ls with no flags lists names of non-hidden entries in the current directory in column form. Add -l for details, -a to include dotfiles, -h for human sizes.

Safety: Preview paths and redirections before changing files or streams.

Long listing with permissions, owner, size, and date.

ls -l

-l switches to long format: type/permissions, link count, owner, group, size, mtime, name. Pair with -h for readable sizes and -t to sort by mtime.

Safety: Preview paths and redirections before changing files or streams.

Long listing including hidden dot-files.

ls -la

-l is long format; -a includes dotfiles (entries starting with '.'). The combination is the standard 'show me everything with details' invocation.

Safety: Preview paths and redirections before changing files or streams.

Long listing with file sizes in human-readable form.

ls -lh

-l gives the long format; -h reformats the size column as 1.2K / 3.4M / 5.6G instead of raw bytes. Far easier to scan when files vary in scale.

Safety: Preview paths and redirections before changing files or streams.

Long listing sorted by modification time, newest first.

ls -lt

-l for long format; -t sorts by modification time, newest first. Add -r to invert the order when you want the oldest at the top instead.

Safety: Preview paths and redirections before changing files or streams.

Build the habit: BashDrill drills ls and the rest of the Bash workflow until the safe first move is automatic. Try a Bash drill.