Command Line Flashcards

1
Q

od

A

display file content’s in octal

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

nl

A

number lines in text file

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

sort

A

sorts in alphabetic order

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

sort -n

A

sort in numerical order

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

less

A

pager utility lets you move through file one page at a time, more flexible than more

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

head

A

lists top ten lines of text file

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

tail

A

shows last ten lines of text file

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

wc

A

displays file lines, words, and bytes

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

uniq

A

finds repeat lines in a text file

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

md5sum

A

can check a files integrity

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

name the secure hash algorithms

A

sha224sum, sha256sum, sha384sum, sha512sum

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

secure hash algorithms

A

can be used to check file integrity, generally used for cryptography

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

grep

A

filters text files

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

STDOUT

A

directs output to terminal

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

>

A

sends the command’s output

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

> >

A

appends data to preexisting file

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

The file descriptor that identifies a command or script file error is

A

2

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

how do you make grep use extended regular expressions (ERE)?

A

grep -E or egrep

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

The file descriptor that identifies output from a command or script file is

20
Q

STDERR

A

identifies a command or script file error

21
Q

The file descriptor that identifies an input into a command or script is

22
Q

STDIN

A

identifies an input into a command or script

23
Q

2>

A

redirect STDERR to a specified file.

24
Q

A

redirect STDERR to the specified file. (append)

25
&>
redirect STDOUT and STDERR to the specified file
26
&>>
redirect STDOUT and STDERR to the specified file (append)
27
redirect STDIN from the specified file into the command
28
<>
redirect STDIN from the specified file into command and redirect STDOUT to the specified file
29
where is the password file
/etc/passwd
30
|
redirect STDOUT, STDIN, and STDERR between multiple commands
31
sed
stream editor
32
stream editor
modifies text that is passed to it via a file or output from a pipeline
33
echo "I like cake." | sed 's/cake/donuts'
I like donuts
34
echo "I love cake and more cake." | sed 's/cake/donuts/g'
I love donuts and more donuts.
35
watch
use it to enact a command over and over again
36
placing an & after a command does what?
runs it in the background
37
sleep
used for adding a pause in a shell script.
38
how do you specify the number of seconds for sleep to run?
sleep n
39
jobs
allows you to see any processes that belong to you that you are running
40
how do you return a program to the foreground?
fg %[job number]
41
jobs -l
lists jobs
42
Ctrl+Z
pauses a process
43
how do you send a program to the background?
bg %[job number]
44
what is the syntax to stop a job in the background with the kill command?
kill %[job number]
45
what command keeps a job running after logout?
nohup [command] &