Command Line Crash Course Flashcards

Learn basics of terminal commands (47 cards)

1
Q

What does “rm -rf /” do?

A

delete all contents of current file/app

never type this

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

What does ‘pwd’ mean?

What does ‘pwd’ do?

A
  • print working directory

- it prints path of current directory

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

hostname

A

my computer’s network name

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

mkdir

A

make directory

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

cd

A

change directory

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

ls

A

list contents of directory

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

rmdir

A

remove directory

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

pushd

A

push directory

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

popd

A

pop directory

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

cp

A

copy a file or directory

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

mv

A

mv [current_name] [new_name]

move (or rename) a file or directory

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

less

A

page through a file

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

cat

A

print the whole file

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

xargs

A

execute argument

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

find

A

find files

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

grep

A

find things inside files

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

man

A

read a manual page

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

apropos

A

find what man page is appropriate

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

env

A

look at your environment

20
Q

echo

A

print some arguments

21
Q

export

A

export/set a new environment variable

22
Q

exit

A

exit the shell

23
Q

sudo

A

become super user root

DANGER! DANGER!

24
Q

chmod

A

change permission modifiers

25
chown
change ownership
26
What is bash?
* command line?
27
alternate name for "directory"?
folder
28
alternate name for "folder"?
directory
29
Unix or Windows command prompt: | $
Unix
30
Unix or Windows command prompt: | >
Windows
31
name for directories inside directories?
path
32
What is a path?
a name for directories inside directories; | a set of directions to the computer for where you want to put something in the tree of folders;
33
What is the "graphical file browser" (or "graphical user interface") on a Mac?
Finder
34
What does "cd .." do?
moves up one directory (to parent directory)
35
What does "cd ../.." do?
moves up two directories (to parent's parent directory)
36
What does CLI mean?
Command Line Interface
37
alternate names for CLI
terminal; bash; (command line) prompt;
38
What does GUI mean?
Graphical User Interface
39
move to root directory
cd /
40
move to home directory
cd ~
41
What is the "graphical file browser" or ("graphical user interface") for Windows?
Windows Explorer
42
What does 'ls -1R' do?
prints all sub-directories
43
What does 'mkdir -p' do?
creates a directory path (even if directories in path haven't yet been created)
44
touch
create new file (in current directory)
45
cp -r
``` cp -r [directory_name] [new_directory_name] copy directory (and its contents) and create new_directory_name ```
46
What does 'rm -rf [directory]' do?
removes specified directory and all of its contents
47
What does 'rm -r [directory]' do?
removes specified directory (if it is empty) | - if directory is not empty, use 'rm -rf [directory]'