Skip to content

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.
  • Labs icon Lab
  • A Cloud Guru
Google Cloud Platform icon
Labs

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.

Google Cloud Platform icon
Labs

Path Info

Level
Clock icon Beginner
Duration
Clock icon 30m
Published
Clock icon Jun 21, 2019

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.

Table of Contents

  1. Challenge

    Determine Which File Is the Oldest

    1. 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/
    
  2. Challenge

    Determine Which File Is the Largest

    1. 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/
    
  3. Challenge

    Determine When the File `~/Practice/Test/sos_commands/networking/netstat_-W_-neopa` Was Last Modified

    1. 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
    
  4. Challenge

    Determine When the File `~/Practice/Test/sos_commands/networking/netstat_-W_-neopa` Was Last Accessed

    1. To view access times, we use -l ("long listing") and-u` (access time).
    ls -lu ~/Practice/Test/sos_commands/networking/netstat_-W_-neopa
    

The Cloud Content team comprises subject matter experts hyper focused on services offered by the leading cloud vendors (AWS, GCP, and Azure), as well as cloud-related technologies such as Linux and DevOps. The team is thrilled to share their knowledge to help you build modern tech solutions from the ground up, secure and optimize your environments, and so much more!

What's a lab?

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.

Provided environment for hands-on practice

We will provide the credentials and environment necessary for you to practice right within your browser.

Guided walkthrough

Follow along with the author’s guided walkthrough and build something new in your provided environment!

Did you know?

On average, you retain 75% more of your learning if you get time for practice.

Start learning by doing today

View Plans