CLI Flashcards

1
Q

pwd

A

print working directory

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

hostname

A

my computer’s network name

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

mkdir

A

make directory

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

cd

A

change directory

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

ls

A

list directory

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

rmdir

A

remove directory

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

pushd

A

push directory

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

popd

A

pop directory

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

cp

A

copy a file or directory

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

mv

A

move a file or directory

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

less - mac
more - pc

A

page through a file

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

cat - mac
type - pc

A

print the whole file

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

xargs

A

execute arguments

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

find - mac
dir -r - pc

A

find files

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

grep - mac
select-string- pc

A

find things inside files

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

man - mac
help - pc

A

read a manual page

17
Q

apropos - mac
helpctr - pc

A

find what man page is appropriate

18
Q

env

A

look at your environment

19
Q

echo

A

print some arguments

20
Q

export - mac
set - pc

A

export/set a new environment variable

21
Q

exit

A

exit the shell

22
Q

sudo - mac
runas - pc

A

DANGER! become super user root DANGER!

23
Q

robocopy

A

robust copy

24
Q

forfiles

A

run a command on lots of files

25
Q

touch - mac
new-item - pc

A

Make empty file

26
Q

3 core cmdlets?

A

help - get-help
gcm - get-command
gm - get-member

27
Q

Git remove remote branch

A

git push origin -d [branch-name]

28
Q

Git get commits with hashes

A

git log

29
Q

Git unstage and uncommit all changes

A

git reset [hash]

30
Q

Git completely remove all changes

A

git reset –hard [hash]

31
Q

Create new react project with Vite

A

npm create vite@latest my-first-react-app – –template react

32
Q

Initialize node project

A

npm init-y