Commands Flashcards

1
Q

cd

A

change directory

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

pwd

A

print working directory (show where you are)

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

ls

A

list all files and directories in the working directory

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

mkdir

A

create a new directory in the working directory

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

touch

A

create a new file in the working directory

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

ls -a

A

lists all contents of the directory, including hidden files and directories

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

ls -l

A

lists all contents in long format

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

ls -t

A

lists all contents by the time they were last modified

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

ls -alt

A

multiple options used together, showing all hidden files and directories in long format, listed by time they were last modified

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

cp

A

copies files

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

mv

A

moves and renames files

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

rm

A

removes files

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

rm -r

A

removes directories (recursive)

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

>

A

redirects stdout of a command to a file, overwriting previous content

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

> >

A

redirects stdout of a command to a file, appending to previous content

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

redirects stdin to a command

17
Q

|

A

redirects stdout of a command to another command

18
Q

sort

A

sorts lines of text alphabetically

19
Q

uniq

A

filters duplicate, adjacent lines of text

20
Q

grep

A

searches for text pattern and outputs it

21
Q

sed

A

searches for a text pattern, modifies it, and outputs it