- Lab
-
Libraries: If you want this lab, consider one of these libraries.
- Cloud

Using Directories and Listing Files
In this hands-on lab, we will practice moving through directories and listing files. Becoming comfortable changing directories, and listing files is a necessary step in moving through a Linux file system.

Lab Info
Table of Contents
-
Challenge
Determine Which File Is the Oldest
- To list the directory and sort by date, we use
-l
for "long listing",-A
for "almost all", and-t
for "sort by time".
ls -lAt ~/Practice/Test/var/log/
- To list the directory and sort by date, we use
-
Challenge
Determine Which File Is the Largest
- To list the directory and sort by file size, we use
-l
("long listing") and-S
("sort by file size").
ls -lS ~/Practice/Test/var/log/
- To list the directory and sort by file size, we use
-
Challenge
Determine When the File `~/Practice/Test/sos_commands/networking/netstat_-W_-neopa` Was Last Modified
- We use a simple
-l
for "long listing" to view the last modified time and date.
ls -l ~/Practice/Test/sos_commands/networking/netstat_-W_-neopa
- We use a simple
-
Challenge
Determine When the File `~/Practice/Test/sos_commands/networking/netstat_-W_-neopa` Was Last Accessed
- To view access times, we use
-l ("long listing") and
-u` (access time).
ls -lu ~/Practice/Test/sos_commands/networking/netstat_-W_-neopa
- To view access times, we use
About the author
Real skill practice before real-world application
Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.
Learn by doing
Engage hands-on with the tools and technologies you’re learning. You pick the skill, we provide the credentials and environment.
Follow your guide
All labs have detailed instructions and objectives, guiding you through the learning process and ensuring you understand every step.
Turn time into mastery
On average, you retain 75% more of your learning if you take time to practice. Hands-on labs set you up for success to make those skills stick.