Shell/Console/Terminal Flashcards

1
Q

a directory is the same as a

A

file

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

what is the term for the current directory you are in

A

working directory

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

what is the difference between a relative and an absolute path

A

an absolute path name begins with a slash and works it way down to the directory you are currently in

a relative path name is the name from where you are working

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

what command will tell you what directory you are in

A

pwd

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

what command will tell you the file names and directories of the directory that you’re in

A

ls (list)

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

what command will tell you the file names and directories of a named directory

A

ls DirName

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

what command changes the working directory to the home directory

A

cd (change directory)

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

what command changes the working directory to be a named directory

A

cd DirName

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

what command changes the working directory to be one directory up

A

cd ..

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

what command allows you to create a directory

A

mkdir DirName

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

what command allows you to delete a directory

A

rmdir DirName

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

what conditions are needed in order to delete a directory

A

it must be empty first

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

what command allows you to remove a file

A

rm fileName

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

what command allows you to move files or directories

A

mv fileToBeMoved LocationToMoveTo

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

what command allows you to rename files or directories

A

mv OldName NewName

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

what command allows you to make copies of files

A

cp fileName1 copyFile

17
Q

what command allows you to make copies of directories and all the files inside of them

A

cp -r directoryName copyDirectoryName

18
Q

what symbol can be used as an abbreviation for the home directory

A

~

19
Q

command to create a file called ‘cars’ and fill it with ‘ford opel’

A

echo ‘ford opel’ > cars

20
Q

command to show what is inside the file ‘cars’

A

more cars