MODULE 7 - Navigating the Filesystem Flashcards

1
Q

Which command would you use to view the contents of the top-level directory in Linux?

A

ls /

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How can you refer to the home directory of a user named bob from the command line, without typing the full path?

A

Use ~bob, which expands to /home/bob.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Which structure defines how files and directories are organized across all Linux systems?

A

The Filesystem Hierarchy Standard (FHS)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What does the command cd do when run without any arguments?

A

It takes the user back to their home directory.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Which command would you run to display the path of your current location in the Linux filesystem?

A

pwd

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Which command is used to navigate from one directory to another in the Linux shell?

A

The cd (change directory) command.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What command moves a user from /home/sysadmin/Documents back up one level to /home/sysadmin?

A

cd ..

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What type of path begins with the / character and always starts from the root directory?

A

An absolute path.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is defined as is a list of directories separated by slashes / that describes the location of a file or directory within the filesystem?

A

A path

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Which type of path gives directions starting from the current working directory?

A

A relative path.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the key difference in how absolute and relative paths begin?

A

Absolute paths start with /; relative paths do not.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Which command lets the user confirm their current location in the filesystem?

A

pwd (print working directory)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What does the command cd ../.. do from any location?

A

It moves the user up two levels in the directory hierarchy.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Which shortcut always represents the current directory?

A

The single dot . represents the current directory.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Which command is used to list the contents of a directory in Linux?

A

ls

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Which command reveals whether ls is aliased on the system?

8
Q

What is the command to run ls without the color alias?

9
Q

Which command reveals all files, including hidden ones, in a directory?

10
Q

Which command displays file metadata such as size, owner, and modification time?

10
Q

What is the purpose of hidden files like .bashrc and .profile?

A

They are customization files used to configure Linux, the shell, or specific programs.

11
Q

What file type is represented by the symbol d in ls -l?

A

A directory.

12
Q

What file type is represented by - in ls -l?

A

A regular file (text, binary, image, etc.).

12
Q

What does the character l represent in the first position of ls -l output?

A

A symbolic link.

13
Q

Which file type is used for inter-process communication and is shown as s or p?

A

s for socket, p for pipe.

13
What does the number after the permissions in ls -l represent?
The hard link count—how many hard links point to the file.
14
Which option shows all files, including hidden files that start with a dot?
→ ls -a displays all files, including hidden ones that begin with a . character.
14
What does the number before the date and time in ls -l indicate?
The file size in bytes.
14
What does the timestamp in ls -l indicate?
The last modification time of the file contents.
14
How are symbolic links displayed in ls -l?
With an arrow (->) showing the link name and the target path.
15
Which character at the beginning of a filename indicates a hidden file in Linux?
→ A file that begins with a dot (.) is a hidden file.
16
Which option combination shows file sizes in megabytes, kilobytes, or gigabytes?
→ ls -lh displays human-readable file sizes.
16
Which option causes ls to list the directory itself rather than its contents?
-d option when used with ls
17
Which command performs a recursive listing, showing all files in a directory and its subdirectories?
ls -R
18
Which option allows you to list the contents of a directory and all its subdirectories?
-R
18
Which ls option is used to sort files from largest to smallest by size?
-S (capital S)
19
Which ls option is used to sort files based on modification time, with the most recent files first?
-t
20
Which ls command shows full timestamps including nanoseconds?
ls - -full-time