Learn how to combine the ls command with head to show us the five last modified files in a directory.
Also find me here:
Baeldung Author
Rens Verhage
Java Software Developer and DevOps engineer from The Neterlands with 15+ years experience in developing enterprise web applications. Cloud enthousiast. World traveler and scuba diver.
Here's what I've written (so far):
Baeldung on Linux
- All
- Administration (6)
- Scripting (5)
- Processes (4)
- Security (2)
- Filesystems (2)
- Files (2)
- File Viewing (2)
- Web (1)
- Network Configuration (1)
- File Searching (1)
- File Compression (1)
Looping Through the Content of a File in Bash
In this tutorial, we’ll see how to loop through the contents of a file, line by line. This might sound like a trivial task, but there are some caveats that we need to be aware of.
Meaning of Tilde in Linux Bash
Filed under Filesystems
Explore the Bash feature called tilde expansion.
Copying SSH Keys To Another Machine
Filed under Administration, Security
Learn how to copy our SSH keys to other machines
Standard Exit Status Codes in Linux
Filed under Scripting
A quick and practical guide to Linux exit codes.
Aborting a Shell Script if Any Command Fails
Learn how to use set -e to make bash scripts terminate immediately when some error occurs.
Set Up cURL to Permanently Use a Proxy
Filed under Web
Learn how to make curl permanently send all requests through a proxy server.
Introduction to Bash Globbing
Filed under File Searching, File Viewing
Learn about the process of filename expansion, also known as globbing.
Specify an Editor for Crontab
Filed under Administration
Learn how to make crontab -e use our favorite editor.