Domain 2 Flashcards

1
Q

cat -b

A

Adds line numbers

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

free

A

Shows available memory

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

type program-name

A

Will show programs directory

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

Ctrl z

A

Suspends running program

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

Bg and fg

A

Sends a program to background or foreground.

Can also use & e.g. blender&

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

Command history stuff

A

Ctrl a = beginning of line

Ctrl e = end of line

Delete key = del highlighted char

Ctrl t = move char on the left over one to the right

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

Search man pages

A

whatis

Man -k
Apropos

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

How to quit less

A

Q, :q or zz

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

Moving in less

A

Space bar = down

B = up

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

Wrap a command in terminal

A

\

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

Linked pages in info

A

Called nodes

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

find

A

Find - can search dir for a document that contains a string

find /usr/share/docs -name “password”

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

whereis

A

Used for finding files in root directories not user directories

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

locate

A

Searches database of file names

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

Shareable verses unshareable files FHS

A

Nonshareable files contain system specific information such as config files

shareable files containing data or program binary files

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

/

A

The root directory

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

/etc

A

System configuration files

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

/boot

A

Boot files such as Linux kernel initial RAMdisk

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

/bin

A

Program files for normal operations

20
Q

/sbin

A

Program files for normal operations not common

21
Q

/lib

A

Who is libraries other programs may use

22
Q

/usr

A

Hold programs and data used for normal system operation but are non-critical for booting system

23
Q

/home

A

Holds users home directories

24
Q

/root

A

Root users home directory

25
/var
Holds variable files such as log files
26
/tmp
Holes temporary files
27
/mnt
Mount a point for a removable media
28
/media
New mount point for removable media
29
/dev
For devices like USB or mouses
30
/run
Information about running system
31
rpm -ql someprogram
Shows were every file in the someprogram package resides on an rpm based system
32
ls -R
Will show files and subdirectory files
33
touch -c
Don’t create a new file if one doesn’t exist used for updating timestamps
34
Hard link versus soft link
Heartland creates a duplicate under a different name but with the same Inode number soft link points to original file
35
Wildcard ? ,* ,[ad], [a-d], [^d]
Matches only 1 char. * matches any number of characters ac matches either a or d a-d matches abcd ^d matches anything but d
36
$ and ^
^bag matches bagger $ matches shitbag
37
grep and commands
-i = ignore case -r = recursive -e = egrep or a regular exp
38
grep examples
grep -r [bd]ash /etc/ grep -E “(games|mail).*nologin” /etc/passwd
39
find . -name *.txt
Finds all files in current directory that end in .txt
40
wc -lwc
Counts lines, words and chars
41
cut d and f flags
cut -f 6 -d “:” /etc/passwd Selects only field 6, fields are created by the : delimiter
42
sort
-d is alpha numeric non special char -n is numerical
43
Redirection operators
1. >> append 2. 2> std error, overwrites it 3. 2>> std error appends 4. &> stdout and std error <> file is used as input and out
44
$() and backticks
Used to group commands separately rm $(find ./ -name *~) Removes all that is found with a tilda at end
45
tail -n 15 file and head -n 15 file
Last 15 lines or top 15 lines