Command Line Index Flashcards

0
Q

$ hostname

iq.home

A

Prints out to the screen the name of the computer.

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

$ pwd

/User/SwirlingBlackHoleOfChaos

A

Print working directory

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

$ mkdir temp

A

Creates new directory (make directory), in this case a directory called temp.

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

$ mkdir “I Have Fun”

A

Creates a directory with spaces in the name.

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

$ cd temp

A

Change directory, in the example to a directory called temp. $ cd . . Means to move to parent directory.

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

$ ls

A

Lists out the content of the directory you are currently in. There are several options i.e. ls -lR which give long description and recursively list sub directories.

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

$ rmdir temp

A

Remove directory

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

$ pushd my/current/directory

A

pushd take the current directory on pushes it on a list then change to the new directory (the one in the parameter “mycurrent/directory” )

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

$ popd

A

popd takes the last directory pushed on the list and “pops” it off, then moves you in to the directory just popped off the list.

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

$ pushd

A

pushd with no parameters will move you from your current directory into the last directory pushed onto the the list. It’s an easy way to switch between two directories.

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

$ mkdir -p a/new/directory

A

mkdir -p will create a new directory, if the directories in the path do not exist mkdir -p will create them.

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