Environment & Redirection Flashcards

1
Q

PushD

A

The pushd command takes your current directory and “pushes” it into a list for later, then it changes to another directory. It’s like saying, “Save where I am, then go here.
On Unix pushd, if you run it by itself with no arguments, will switch between your current directory and the last one you pushed.

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

PopD

A

The popd command takes the last directory you pushed and “pops” it off, taking you back there.

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

What is | ?

A

Piping. This moves the output of one process to the input of another process

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

What is > or < ?

A

This redirects output of a process to replace the contents of a file

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

What is&raquo_space; or &laquo_space; ?

A

This appends output of a process to an existing file

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

echo $HOME

A

This calls to output the value of the variable HOME

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

How do you set variables?

A

Don’t use $ sign. Just set it. PS1=”\u \w $”

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

“Find?”

A

Find looks for file or folder names find . -name “hello.txt” MAN find for help

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

“Grep?”

A

Looks for Global Regular expression Print. basically searches inside a file. -n lists the output’s line numbers. GREP is case sensitive. Just pass -i option to make case Insensitive. Pass -v option to INVERT or provide the negative outcome. MAN grep for help

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

Apropos?

A

Apropos finds help similar to MAN

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