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
&\>
Redirect output to a file without showing error messages
26
\>\>
Redirect output to append to a file
27
"
Redirect input
28
more
Opens text file in page browser with support for scrolling down
29
less
Opposite of more. Opens text file in page browser with ability to scroll up or down
30
strings
Finds printable strings in an object or binary file.
31
wc
Word count. Print the number of lines, words, and characters for a file.
32
wc -l
Print total number of lines for a file
33
wc -w
Prints total number of words in a file.
34
wc -c
Prints total number of characters in a file
35
head
Prints the first 10 lines of a file
36
tail
Prints the last 10 lines of a file.
37
script
Records everything printed on screen and writes it to a file
38
image
Takes a screen shot (in red hat Linux only)
39
grep
Regular expression search
40
egrep
Extended regular expression search
41
fgrep
Fast regular expression search
42
ls -a
Shows hidden files
43
history
Shows saved history in RAM
44
ln
Creates a hard link
45
ln -s
Creates a soft link
46
mount
Attach file system
47
umount
Detach file system
48
df
Check usage of mounted file systems
49
tar
File compressor
50
ps
Check process status
51
bg or &
Sends foreground process to background
52
ctrl-z
Stop process running
53
jobs
Shows all background process id's
54
fg %[id]
Send background process [id] to foreground
55
kill %[id]
Terminate background process [id]
56
kill -9 [id]
Terminate foreground process [id]
57
ctrl-c
Terminate current running process
58
/bin/sh
Launch Bourne shell
59
/bin/csh
Launch C shell
60
/bin/ksh
Launch Korn shell
61
/bin/bash
Launch Bash shell
62
List files, long form
ls -l
63
Print working directory
pwd
64
Determine file type
file
65
Print or set the system date and time
date
66
Display the last modification time of a file
date -r
67
Updates the access and modification times of each file to the current time. Creates file if it does not exist
touch [file1, file2...]
68
Changes file access permissions
chmod
69
Displays the manual page for a command
man
70
Searches the manual for a keyword
man -k
71
Change directory
cd
72
Go back to home directory
cd [blank]
73
Go back to previous directory
cd -
74
Make a new directory
mkdir
75
Rename or move a file or directory
mv
76
Delete a file
rm
77
Delete a directory
rm -rf
78
Delete an empty directory
rmdir
79
Copy a file
cp
80
Copy a directory
cp -r
81
List files
ls
82
Concatenates (prints) file to screen
cat
83
Prints file with line numbers
cat -n
84
Opens a file in a text editor
vi
85
Redirect output (typically to a file)
\>
86
Redirect output to a file without showing error messages
&\>
87
Redirect output to append to a file
\>\>
88
Redirect input
"
89
Opens text file in page browser with support for scrolling down
more
90
Opposite of more. Opens text file in page browser with ability to scroll up or down
less
91
Finds printable strings in an object or binary file.
strings
92
Word count. Print the number of lines, words, and characters for a file.
wc
93
Print total number of lines for a file
wc -l
94
Prints total number of words in a file.
wc -w
95
Prints total number of characters in a file
wc -c
96
Prints the first 10 lines of a file
head
97
Prints the last 10 lines of a file.
tail
98
Records everything printed on screen and writes it to a file
script
99
Takes a screen shot (in red hat Linux only)
image
100
Regular expression search
grep
101
Extended regular expression search
egrep
102
Fast regular expression search
fgrep
103
Shows hidden files
ls -a
104
Shows saved history in RAM
history
105
Creates a hard link
ln
106
Creates a soft link
ln -s
107
Attach file system
mount
108
Detach file system
umount
109
Check usage of mounted file systems
df
110
File compressor
tar
111
Check process status
ps
112
Sends foreground process to background
bg or &
113
Stop process running
ctrl-z
114
Shows all background process id's
jobs
115
Send background process [id] to foreground
fg %[id]
116
Terminate background process [id]
kill %[id]
117
Terminate foreground process [id]
kill -9 [id]
118
Terminate current running process
ctrl-c
119
Launch Bourne shell
/bin/sh
120
Launch C shell
/bin/csh
121
Launch Korn shell
/bin/ksh
122
Launch Bash shell
/bin/bash