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

18
Q

Find files

19
Q

Find things in files

20
Q

Find what man page is appropriate

21
Q

Look at your environment

22
Q

Print some arguments

23
Q

Export/set a new environment variable

24
Q

Exit the shell

25
DANGER! become super user root DANGER!
sudo
26
Change permission modifiers
chmod
27
Change ownership
chown
28
Output from commands on the left brought to commands on the right.
$ | $
29
Send input from the command on the right to the command from the left
$<$
30
Output from command on left and write it on file to the right
$>$
31
Output of command on left and append to file on right
$>>$
32
Matches anything in a wildcard
*
33
print all documents with a filename with a certain name
find STARTDIR -name WILDCARD -print
34
Fill in the rest of the word you've started typing
tab
35
Get your previous command
up
36
Go to the beginning of the line
Ctrl + a
37
Go to the end of the line
Ctrl + e
38
Delete everything on the line after your current character
Ctrl + k
39
Go to the next tab
Cmd + shift + [
40
Go to the previous tab
Cmd + shift + ]