Unix Commands 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 [-p create intermediaries, -v verbose list created]

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

cd

A

change directory [no args home dir, ~ home dir]

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

ls

A

list directory [-a list all, -l long / detail format, -R recurse subdir]

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 (save where I am, then go here)

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

popd

A

pop directory (return to saved dir)

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

touch

A

update mod and access time, or create new empty file

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

cp

A

copy a file or directory [-i prompt on overwrite, -n do not overwrite, -R copy subdirs]

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

mv

A

rename a file, move a file or directory [-i prompt on overwrite, -n do not overwrite]

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

rm

A

remove a file or directory [-r recursively remove files and dir]

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

more

A

scroll through a file

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

less

A

page through a file, backwards too

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

cat

A

stream file(s) to stdout [-n number the lines]

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

pipe (|)

A

output of one command to input of following command

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

redirect out (>)

A

write output of a command to a file

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

redirect in (<)

A

use file as input for a command

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

append output (»)

A

appends output of command to the file

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

xargs

A

collect/execute arguments, for other command

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

find

A

find files [provide start path, -name filename”]

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

grep

A

find things inside files [-i ignore case, -r recurse subdirs (may not work)]

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

man

A

rtfm - read a manual page

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

apropos

A

find what man page is appropriate

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

whatis

A

brief description of command

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

env

A

look at your environment

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

echo

A

write argument(s) to stdout

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

export

A

set a new environment variable

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

unset

A

unset an environment variable

30
Q

sudo

A

become super user root DANGER!

31
Q

exit

A

exit the shell

32
Q

chmod

A

change permission modifiers

33
Q

chown

A

change ownership

34
Q

which

A

determine which program/command executes in path

35
Q

print working directory

A

pwd

36
Q

my computer’s network name

A

hostname

37
Q

make directory [-p create intermediaries, -v verbose list created]

A

mkdir

38
Q

change directory [no args home dir, ~ home dir]

A

cd

39
Q

list directory [-a list all, -l long / detail format, -R recurse subdir]

A

ls

40
Q

remove directory

A

rmdir

41
Q

push directory (save where I am, then go here)

A

pushd

42
Q

pop directory (return to saved dir)

A

popd

43
Q

update mod and access time, or create new empty file

A

touch

44
Q

copy a file or directory [-i prompt on overwrite, -n do not overwrite, -R copy subdirs]

A

cp

45
Q

rename a file, move a file or directory [-i prompt on overwrite, -n do not overwrite]

A

mv

46
Q

remove a file or directory [-r recursively remove files and dir]

A

rm

47
Q

scroll through a file

A

more

48
Q

page through a file, backwards too

A

less

49
Q

stream file(s) to stdout [-n number the lines]

A

cat

50
Q

output of one command to input of following command

A

pipe (|)

51
Q

write output of a command to a file

A

redirect out (>)

52
Q

use file as input for a command

A

redirect in (<)

53
Q

appends output of command to the file

A

append output (»)

54
Q

execute arguments

A

xargs

55
Q

find files [provide start path, -name filename]

A

find

56
Q

find things inside files [-i ignore case, -r recurse subdirs (may not work)]

A

grep

57
Q

rtfm - read a manual page

A

man

58
Q

find what man page is appropriate

A

apropos

59
Q

brief description of command

A

whatis

60
Q

look at your environment

A

env

61
Q

write argument(s) to stdout

A

echo

62
Q

set a new environment variable

A

export

63
Q

remove an environment variable

A

unset

64
Q

become super user root DANGER!

A

sudo

65
Q

exit the shell

A

exit

66
Q

change permission modifiers

A

chmod

67
Q

change ownership

A

chown

68
Q

jobs

A

List current running processes

69
Q

List current running processes

A

jobs

70
Q

open

A

Opens given file using default program (uses finder when a dir)

71
Q

Opens given file using default program (uses finder when a dir)

A

open