Terminal Flashcards

1
Q

Shortcut to open up terminal on the mac?

A

CMD + Space

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

pwd

A

Printing Work Directory

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

ls

A

list files

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

cd ..

A

traverse to parent folder

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

cd /

A

root directory of computer

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

cd ~

A

root directory of current user

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

mkdir

A

will make a new directory, whatever argument you pass into this command will be the name of your new file.

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

rmdir

A

will try to delete a folder, but if there are files you’ll get an error

instead rm -rf where r stands for recursive, which is saying continue the remove function for all files and folders inside this directory. the f stands for force, the delete will happen regardless of permissions.

so empty folder:
rmdir [folder name]

non-empty folder:
rm -rf [folder name]

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

touch

A

creates a new, empty file with the nane and extension type that you specify.

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

rm

A

rm [file name]

Y for yes, and N for no

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

mv

A

two uses. firt you can rename a file by first providing the file’s name and then providing what you want the file to be renamed to. or move

mv renamedFile.html ../renamedFile.html

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

cp

A

The cp command will copy a file into the current directory with the new name you provide

cp -rf to copy a file folder recursively

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