Section1 Filesystem Navigation Flashcards

(27 cards)

1
Q

What command is used to determine your current location, or print working directory, in the Linux filesystem?

A

pwd
Print working directory

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

What is the primary goal of the Practice Lab 1: Navigating the Linux Filesystem exercise?

A

To navigate a complex directory structure and locate a hidden file using basic Linux commands.

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

What command is used to list the contents of the current directory?

A

ls
List contents

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

To list directory contents in a long format showing permissions, owner, size, and modification date, you would use the command ‘ls’ with the —- option.

A

-l
example ls -l

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

In the output of ls -l
what does the leading ‘d’ in the permission string like ‘drwxr..’ signify?

A

It signifies that the item is a directory.

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

What command is used to change your current directory?

A

cd
change directory

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

How would you move from your current location into a subdirectory named ‘Level 1’?

A

cd Level1

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

What command moves you directly to the root of the entire filesystem?

A

cd /

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

What special character represents the root of the Linux filesystem?

A

/

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

Which command allows you to quickly return to the directory you were in immediately before the current one?

A

cd -

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

What is the shorthand to move up one level to the parent directory?

A

cd ..

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

How can you move up two directory levels from your current position with a single command?

A

cd ../..

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

A path that starts from the root directory / is known as the ____ path.

A

absolute

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

What is the key characteristic of a file that makes it ‘hidden’ in Linux?

A

It name begins with a period

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

If you are in a directory containing only a hidden file named .secret what will the output of only ls command

A

Nothing will be listed for using ls when looking for a secret directory

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

To list all files in a directory, including hidden ones, you must use the ls command with what option.

A

-a
example ls -a

16
Q

What two commands can be used to return to your home directory from anywhere in the filesystem?

A

cd ~ or just cd

17
Q

What special character is a shortcut for the users home directory?

18
Q

What command creates a new directory?

19
Q

The mkdir -p Level1/Level2/Level3 command is used to create a nested directory structure. What is the function of the -p option?

A

It creates any necessary parent directories that do not already exist.

20
Q

What command is used to create a new, empty file (or update the timestamp of an existing file)?

21
Q

How would you create a hidden file named .hidden_key.txt?

A

touch .hidden_key.txt

22
Q

What command is used to remove files or directories?

A

rm
example rm directory
or
example rm file

23
Q

To remove a directory and all its contents (including subdirectories) you must use the rm command with the __ option for recursive deletion.

A

-r
example rm -r directory

24
What command would you use to delete the Level1 directory and everything inside it, as in the cleanup lab?
rm -r Level1
25
Command cd ~/Level1/Level2/Level3/Secrets
Purpose: Navigates directly to the Secrets directory using an absolute path starting from the home directory.
26
In the ouput of the ls -a what does the period and the period period entries represent
'.' represents the current directory, and the '..' represents the parent directory.