---
tags: [procedural, shell]
created: Tuesday, April 15, 2025
---

# Advanced listing in the shell

## List items by most recently modified

```sh
# -l = long format, t = time
ls -lt
```

To include the full date:

```sh
ls -l --time-style=long-iso
```

## Limit the number of items returned

```sh
ls -l | head -n
```

For example, to list the first five items:

```sh
ls -l | head -5
```
