OS X Flashcards

1
Q

where is .bash_profile?

A

in my home directory

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

add a comment to .bash_profile

A

like this

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

add an alias to .bash_profile

A

alias trs=”cd /code/trustroots”

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

create file with specific input in terminal

A

echo “«input»” > «filename»

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

create empty file in terminal

A

touch _«file path»/«filename»

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

move element to another folder in terminal

A

mv «element» «relative path to target folder»/

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

download a file to current repository in terminal

A

wget «file url»

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

or condition in regex

A

/(2019«|»2020)/

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

end of string in regex

A

/.jpg«$»/

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

print current directory path in terminal

A

pwd

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

force quit on mac

A

⌥ ⌘ ESC

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

autocomplete in terminal

A

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

create new folder in terminal

A

mkdir _«folder path»/«folder name»

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

copy element to another folder in terminal

A

cp «element» «relative path to target folder»

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

delete a file in terminal

A

rm «file»

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

delete a folder in terminal

A

rm «folder» -r

17
Q

show homebrew services

A

brew services list

18
Q

stop homebrew service

A

brew services stop «service»

19
Q

start homebrew service

A

brew services start «service»

20
Q

restart homebrew service

A

brew services restart «service»

21
Q

open VSC in current location

A

code .

22
Q

switch to left/right desktop

A

CTRL ←/→