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
whatis
brief description of command
26
env
look at your environment
27
echo
write argument(s) to stdout
28
export
set a new environment variable
29
unset
unset an environment variable
30
sudo
become super user root DANGER!
31
exit
exit the shell
32
chmod
change permission modifiers
33
chown
change ownership
34
which
determine which program/command executes in path
35
print working directory
pwd
36
my computer's network name
hostname
37
make directory [-p create intermediaries, -v verbose list created]
mkdir
38
change directory [no args home dir, ~ home dir]
cd
39
list directory [-a list all, -l long / detail format, -R recurse subdir]
ls
40
remove directory
rmdir
41
push directory (save where I am, then go here)
pushd
42
pop directory (return to saved dir)
popd
43
update mod and access time, or create new empty file
touch
44
copy a file or directory [-i prompt on overwrite, -n do not overwrite, -R copy subdirs]
cp
45
rename a file, move a file or directory [-i prompt on overwrite, -n do not overwrite]
mv
46
remove a file or directory [-r recursively remove files and dir]
rm
47
scroll through a file
more
48
page through a file, backwards too
less
49
stream file(s) to stdout [-n number the lines]
cat
50
output of one command to input of following command
pipe (|)
51
write output of a command to a file
redirect out (>)
52
use file as input for a command
redirect in (<)
53
appends output of command to the file
append output (>>)
54
execute arguments
xargs
55
find files [provide start path, -name filename]
find
56
find things inside files [-i ignore case, -r recurse subdirs (may not work)]
grep
57
rtfm - read a manual page
man
58
find what man page is appropriate
apropos
59
brief description of command
whatis
60
look at your environment
env
61
write argument(s) to stdout
echo
62
set a new environment variable
export
63
remove an environment variable
unset
64
become super user root DANGER!
sudo
65
exit the shell
exit
66
change permission modifiers
chmod
67
change ownership
chown
68
jobs
List current running processes
69
List current running processes
jobs
70
open
Opens given file using default program (uses finder when a dir)
71
Opens given file using default program (uses finder when a dir)
open