Git Bash Flashcards

1
Q

How do you see the current directory?

A

pwd

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

How do you change directories?

A

cd

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

How do you see every file in the current directory?

A

ls

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

How do you clear the terminal?

A

clear

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

What does pwd do?

A

It tells you the current directory.

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

What does cd do?

A

It changes directories.

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

What does ls do?

A

It shows every file in the current directory.

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

What does clear do?

A

It clears the terminal.

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

How do you see the contents of the home directory?

A

ls ~

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

What does ls ~ do?

A

It shows the contents of the home directory.

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

How do you go one directory back?

A

../

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

How do you list all the files in long format?

A

ls -l.

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

What does ls -l do?

A

It lists all the files in a long format.

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

How do you see all files in a directory, including hidden ones?

A

ls -a

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

What does ls -a do?

A

It shows all files in the current directory, including hidden ones.

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

How do you sort a directory by size?

17
Q

What does ls -lS do?

A

It sorts the directory by size.

18
Q

How do you list all the files with the .txt extension in the Documents folder?

A

ls /Documents/*txt

19
Q

What does ls /Documents/*txt do?

A

It lists all the files with the .txt extension in the Documents folder.

20
Q

How do you save a text file with the ls output?

21
Q

What does > out.txt do?

A

It saves a text file with the ls output.

22
Q

How do you list out all the directories?

23
Q

What does ls -d */ do?

A

It lists out all the directories.

24
Q

What does the cd command do on its own?

A

It brings you to the current home directory.

25
How do you go to the parent directory?
cd ..
26
What does cd .. do?
It brings you to the parent directory.
27
How do you navigate to the My Books folder?
cd My\ Books OR cd 'My Books'
28
What does the cat command do on its on?
It echoes whatever you type.
29
How do you exit the cat command?
CTRL + D
30
How do you print a txt file with cat?
cat file_name.txt
31
How do you print two txt files with cat?
cat list1.txt list2.txt
32
How do you print a txt file with line numbers?
cat -b list1.txt