Linux basics Flashcards

1
Q

\

A

Escape character. If you want to reference a special character, you must “escape” it
with a backslash first.

Example: touch /tmp/filename*

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

/

A

Directory separator, used to separate a string of directory names.

Example: /usr/src/linux

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

.

A

Current directory. Can also “hide” files when it is the first character in a filename.

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

..

A

Parent directory

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

~

A

User’s home directory

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

*

A

Represents 0 or more characters in a filename, or by
itself, all files in a directory.

Example: pic*2002 can represent the files pic2002, picJanuary2002,
picFeb292002, etc.

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

?

A

Represents a single character in a filename.

Example: hello?.txt can represent hello1.txt, helloz.txt, but not
hello22.txt

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

[ ]

A

Can be used to represent a range of values, e.g. [0-9], [A-Z], etc.

Example: hello[0-2].txt represents the names hello0.txt,
hello1.txt, and hello2.txt

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

|

A

“Pipe”. Redirect the output of one command into another command.

Example: ls | more

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

>

A

Redirect output of a command into a new file. If the file already exists, over-write it.

Example: ls > myfiles.txt

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

> >

A

Redirect the output of a command onto the end of an existing file.

Example: echo “Mary 555-1234”&raquo_space; phonenumbers.txt

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

<

A

Redirect a file as input to a program.

Example: more < phonenumbers.txt

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

;

A

Command separator. Allows you to execute multiple commands on a single line.

Example: cd /var/log ; less messages

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

&&

A

Command separator as above, but only runs the second command if the first one
finished without errors.

Example: cd /var/logs && less messages

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

&

A

Execute a command in the background, and immediately get your shell back.

Example: find / -name core > /tmp/corefiles.txt &

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