Linux Directory Navigation

Beginner

Introduction

Welcome to the Linux Directory Navigation Challenge! In this challenge, you'll put your basic Linux command-line skills to the test. Imagine you're a system administrator who needs to quickly gather information about the current working directory and its contents. Your task is to navigate the file system and retrieve specific details using only the pwd and ls commands. This challenge will help you become more comfortable with these fundamental Linux commands and improve your ability to gather directory information efficiently.

Tips: This challenge differs from the step-by-step learning Lab and requires you to complete it independently to demonstrate your mastery of the skills.


Skills Graph

Directory Exploration

In this challenge, you'll put your basic Linux command-line skills to the test. Imagine you're a system administrator who needs to quickly gather information about the current working directory and its contents. Your task is to navigate the file system and retrieve specific details using only the pwd and ls commands. This challenge will help you become more comfortable with these fundamental Linux commands and improve your ability to gather directory information efficiently.

Tasks

  1. Determine the current working directory.
  2. List all files and directories in the /home/labex/project directory, including hidden files.
  3. Display the contents of the /home/labex/project directory in a long listing format, showing file permissions, owner, size, and modification date.

Requirements

  • You must use the /home/labex/project directory as your working directory.
  • You are only allowed to use the pwd and ls commands.
  • All commands must be executed in the terminal.
  • You must use appropriate options with the ls command to achieve the required output formats.
  • Don't use combinations of commands or pipes to achieve the desired output.

Example

Here's an example of what your output might look like (note that your actual output will depend on the contents of the directory):

$ ░░░
/home/labex/project

$ ░░░
. .. .hidden_file file1.txt file2.txt directory1

$ ░░░
total 16
drwxr-xr-x 2 labex labex 4096 Aug 7 10:00 directory1
-rw-r--r-- 1 labex labex 100 Aug 7 09:55 file1.txt
-rw-r--r-- 1 labex labex 200 Aug 7 09:58 file2.txt

Summary

In this challenge, you practiced using two fundamental Linux commands: pwd and ls. You learned how to determine your current working directory and list directory contents with various options. These skills are essential for navigating and gathering information about the file system in a Linux environment. By mastering these basic commands, you've laid a solid foundation for more advanced Linux file system operations and command-line usage.