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
Q

/var

A

Holds variable files such as log files

26
Q

/tmp

A

Holes temporary files

27
Q

/mnt

A

Mount a point for a removable media

28
Q

/media

A

New mount point for removable media

29
Q

/dev

A

For devices like USB or mouses

30
Q

/run

A

Information about running system

31
Q

rpm -ql someprogram

A

Shows were every file in the someprogram package resides on an rpm based system

32
Q

ls -R

A

Will show files and subdirectory files

33
Q

touch -c

A

Don’t create a new file if one doesn’t exist

used for updating timestamps

34
Q

Hard link versus soft link

A

Heartland creates a duplicate under a different name but with the same Inode number

soft link points to original file

35
Q

Wildcard ? ,* ,[ad], [a-d], [^d]

A

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
Q

$ and ^

A

^bag matches bagger
$ matches shitbag

37
Q

grep and commands

A

-i = ignore case
-r = recursive
-e = egrep or a regular exp

38
Q

grep examples

A

grep -r [bd]ash /etc/

grep -E “(games|mail).*nologin” /etc/passwd

39
Q

find . -name *.txt

A

Finds all files in current directory that end in .txt

40
Q

wc -lwc

A

Counts lines, words and chars

41
Q

cut d and f flags

A

cut -f 6 -d “:” /etc/passwd

Selects only field 6, fields are created by the : delimiter

42
Q

sort

A

-d is alpha numeric non special char

-n is numerical

43
Q

Redirection operators

A
  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
Q

$() and backticks

A

Used to group commands separately

rm $(find ./ -name *~)

Removes all that is found with a tilda at end

45
Q

tail -n 15 file and head -n 15 file

A

Last 15 lines or top 15 lines