Unix Commands Flashcards

1
Q

ls -l

A

List files, long form

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

pwd

A

Print working directory

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

file

A

Determine file type

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

date

A

Print or set the system date and time

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

date -r

A

Display the last modification time of a file

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

touch [file1, file2…]

A

Updates the access and modification times of each file to the current time. Creates file if it does not exist

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

chmod

A

Changes file access permissions

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

man

A

Displays the manual page for a command

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

man -k

A

Searches the manual for a keyword

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

cd

A

Change directory

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

cd [blank]

A

Go back to home directory

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

cd -

A

Go back to previous directory

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

mkdir

A

Make a new directory

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

mv

A

Rename or move a file or directory

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

rm

A

Delete a file

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

rm -rf

A

Delete a directory

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

rmdir

A

Delete an empty directory

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

cp

A

Copy a file

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

cp -r

A

Copy a directory

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

ls

A

List files

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

cat

A

Concatenates (prints) file to screen

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

cat -n

A

Prints file with line numbers

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

vi

A

Opens a file in a text editor

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

>

A

Redirect output (typically to a file)

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

&>

A

Redirect output to a file without showing error messages

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

>>

A

Redirect output to append to a file

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

A

Redirect input

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

more

A

Opens text file in page browser with support for scrolling down

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

less

A

Opposite of more. Opens text file in page browser with ability to scroll up or down

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

strings

A

Finds printable strings in an object or binary file.

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

wc

A

Word count. Print the number of lines, words, and characters for a file.

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

wc -l

A

Print total number of lines for a file

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

wc -w

A

Prints total number of words in a file.

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

wc -c

A

Prints total number of characters in a file

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

head

A

Prints the first 10 lines of a file

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

tail

A

Prints the last 10 lines of a file.

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

script

A

Records everything printed on screen and writes it to a file

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

image

A

Takes a screen shot (in red hat Linux only)

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

grep

A

Regular expression search

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

egrep

A

Extended regular expression search

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

fgrep

A

Fast regular expression search

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

ls -a

A

Shows hidden files

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

history

A

Shows saved history in RAM

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

ln

A

Creates a hard link

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

ln -s

A

Creates a soft link

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

mount

A

Attach file system

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

umount

A

Detach file system

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

df

A

Check usage of mounted file systems

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

tar

A

File compressor

50
Q

ps

A

Check process status

51
Q

bg or &

A

Sends foreground process to background

52
Q

ctrl-z

A

Stop process running

53
Q

jobs

A

Shows all background process id’s

54
Q

fg %[id]

A

Send background process [id] to foreground

55
Q

kill %[id]

A

Terminate background process [id]

56
Q

kill -9 [id]

A

Terminate foreground process [id]

57
Q

ctrl-c

A

Terminate current running process

58
Q

/bin/sh

A

Launch Bourne shell

59
Q

/bin/csh

A

Launch C shell

60
Q

/bin/ksh

A

Launch Korn shell

61
Q

/bin/bash

A

Launch Bash shell

62
Q

List files, long form

A

ls -l

63
Q

Print working directory

A

pwd

64
Q

Determine file type

A

file

65
Q

Print or set the system date and time

A

date

66
Q

Display the last modification time of a file

A

date -r

67
Q

Updates the access and modification times of each file to the current time. Creates file if it does not exist

A

touch [file1, file2…]

68
Q

Changes file access permissions

A

chmod

69
Q

Displays the manual page for a command

A

man

70
Q

Searches the manual for a keyword

A

man -k

71
Q

Change directory

A

cd

72
Q

Go back to home directory

A

cd [blank]

73
Q

Go back to previous directory

A

cd -

74
Q

Make a new directory

A

mkdir

75
Q

Rename or move a file or directory

A

mv

76
Q

Delete a file

A

rm

77
Q

Delete a directory

A

rm -rf

78
Q

Delete an empty directory

A

rmdir

79
Q

Copy a file

A

cp

80
Q

Copy a directory

A

cp -r

81
Q

List files

A

ls

82
Q

Concatenates (prints) file to screen

A

cat

83
Q

Prints file with line numbers

A

cat -n

84
Q

Opens a file in a text editor

A

vi

85
Q

Redirect output (typically to a file)

A

>

86
Q

Redirect output to a file without showing error messages

A

&>

87
Q

Redirect output to append to a file

A

>>

88
Q

Redirect input

A

89
Q

Opens text file in page browser with support for scrolling down

A

more

90
Q

Opposite of more. Opens text file in page browser with ability to scroll up or down

A

less

91
Q

Finds printable strings in an object or binary file.

A

strings

92
Q

Word count. Print the number of lines, words, and characters for a file.

A

wc

93
Q

Print total number of lines for a file

A

wc -l

94
Q

Prints total number of words in a file.

A

wc -w

95
Q

Prints total number of characters in a file

A

wc -c

96
Q

Prints the first 10 lines of a file

A

head

97
Q

Prints the last 10 lines of a file.

A

tail

98
Q

Records everything printed on screen and writes it to a file

A

script

99
Q

Takes a screen shot (in red hat Linux only)

A

image

100
Q

Regular expression search

A

grep

101
Q

Extended regular expression search

A

egrep

102
Q

Fast regular expression search

A

fgrep

103
Q

Shows hidden files

A

ls -a

104
Q

Shows saved history in RAM

A

history

105
Q

Creates a hard link

A

ln

106
Q

Creates a soft link

A

ln -s

107
Q

Attach file system

A

mount

108
Q

Detach file system

A

umount

109
Q

Check usage of mounted file systems

A

df

110
Q

File compressor

A

tar

111
Q

Check process status

A

ps

112
Q

Sends foreground process to background

A

bg or &

113
Q

Stop process running

A

ctrl-z

114
Q

Shows all background process id’s

A

jobs

115
Q

Send background process [id] to foreground

A

fg %[id]

116
Q

Terminate background process [id]

A

kill %[id]

117
Q

Terminate foreground process [id]

A

kill -9 [id]

118
Q

Terminate current running process

A

ctrl-c

119
Q

Launch Bourne shell

A

/bin/sh

120
Q

Launch C shell

A

/bin/csh

121
Q

Launch Korn shell

A

/bin/ksh

122
Q

Launch Bash shell

A

/bin/bash