Command line shortcuts (OSX) Flashcards

1
Q

Go to the home directory

A

cd ~

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

Go up a folder level

A

cd ..

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

Read about a command

A

man

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

Print out current working directory (path / name)

A

pwd

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

Create a new directory

A

mkdir

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

Make a new empty file

A

touch

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

Copy a file

A

cp

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

Move a file

A

mv

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

Remove a file

A

rm

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

Show the contents of a file in a scrolling buffer

A

less

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

My computer’s network name

A

hostname

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

Print out everything in a directory

A

ls

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

Remove a directory

A

rmdir

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

Push directory

A

pushd

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

Pop directory

A

popd

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

Print the whole file

A

cat

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

Execute arguments

A

xargs

18
Q

Find files

A

find

19
Q

Find things in files

A

grep

20
Q

Find what man page is appropriate

A

apropos

21
Q

Look at your environment

A

env

22
Q

Print some arguments

A

echo

23
Q

Export/set a new environment variable

A

export

24
Q

Exit the shell

A

exit

25
Q

DANGER! become super user root DANGER!

A

sudo

26
Q

Change permission modifiers

A

chmod

27
Q

Change ownership

A

chown

28
Q

Output from commands on the left brought to commands on the right.

A

$ | $

29
Q

Send input from the command on the right to the command from the left

A

$<$

30
Q

Output from command on left and write it on file to the right

A

$>$

31
Q

Output of command on left and append to file on right

A

$»$

32
Q

Matches anything in a wildcard

A

*

33
Q

print all documents with a filename with a certain name

A

find STARTDIR -name WILDCARD -print

34
Q

Fill in the rest of the word you’ve started typing

A

tab

35
Q

Get your previous command

A

up

36
Q

Go to the beginning of the line

A

Ctrl + a

37
Q

Go to the end of the line

A

Ctrl + e

38
Q

Delete everything on the line after your current character

A

Ctrl + k

39
Q

Go to the next tab

A

Cmd + shift + [

40
Q

Go to the previous tab

A

Cmd + shift + ]