Switches Flashcards

1
Q

type -a

A

returns all of the places that contain an executable named file

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

uname -a

A

show all information

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

history -c

A

clear the history

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

man -k

A

search man pages for a topic; requires the whatis database to work
man -k ““system information””

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

man #

A

select the section in the man page to open

man 5 passwd

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

xargs -d

A

specify the delimiter

defaults to space

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

cat -E

A

display a “”$”” at the end of each line

–show-ends

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

cat -n

A

adds line numbers to the beginning of every line.

–number

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

cat -b

A

adds line numbers to the beginning of every line that contains text
–number-nonblank

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

cat -s

A

compresses groups of blank lines down to a single blank line

–squeeze-blank

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

cat -T

A

displays tab characters as ““∧I””

–show-tabs

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

cat -v

A

displays most control and other special characters using carat ( ∧ ) and M- notations.
–show-nonprinting

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

join -t CHAR

A

use CHAR as input and output field separator

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

join -i

A

ignore differences in case when comparing fields

–ignore-case

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

expand -t NUMBER

A

have tabs NUMBER characters apart; not 8

–tabs=NUMBER

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

sort -f

A

ignore case

–ignore-case; (fold)

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

sort -M

A

sort by three-letter month abbreviation ( JAN through DEC )

–month-sort

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

sort -n

A

compare according to string numerical value

–numeric-sort

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

sort -r

A

reverse the result of comparisons

–reverse

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

sort -k KEYDEF

A

sort via a key; KEYDEF gives location and type
–key=KEYDEF
(KEYDEF can be two numbered fields separated by commas; to sort on multiple fields.)
E.G. sort -k 3 listing1.1.txt

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

split -b NUMBER

A

put NUMBER bytes per output file

–bytes=NUMBER

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

split -C NUMBER

A

put at most NUMBER bytes of records per output file

–line-bytes=NUMBER

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

split -l NUMBER

A

put NUMBER lines/records per output file

–lines=NUMBER

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

tr -t

A

first truncate SET1 to length of SET2

–truncate-set1

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

tr -d

A

delete characters in SET1; do not translate

–delete

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

unexpand -t LIST

A

use comma separated LIST of tab positions (enables -a)

–tabs=LIST

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

fmt -w NUMBER

A

maximum line width (default of 75 columns)

–width=NUMBER

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

nl -b STYLE

A

use STYLE for numbering body lines
–body-numbering=STYLE
STYLE is:
t (The default behavior is to number lines that aren’t empty. You can make this default explicit by using a style code of t .)
a (This style code causes all lines to be numbered; including empty lines.)
n (This style code causes all line numbers to be omitted; which may be desirable for headers or footers.)
pREGEXP (This option causes only lines that match the specified regular expression ( REGEXP ) to be numbered.)

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

nl -h STYLE

A

use STYLE for numbering header lines
–header-numbering=STYLE
STYLE is: t (The default behavior is to number lines that aren’t empty. You can make this default explicit by using a style code of t .) a (This style code causes all lines to be numbered; including empty lines.) n (This style code causes all line numbers to be omitted; which may be desirable for headers or footers.)
pREGEXP (This option causes only lines that match the specified regular expression ( REGEXP ) to be numbered.)

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

nl -f STYLE

A

use STYLE for numbering footer lines
–footer-numbering=STYLE
STYLE is: t (The default behavior is to number lines that aren’t empty. You can make this default explicit by using a style code of t .) a (This style code causes all lines to be numbered; including empty lines.) n (This style code causes all line numbers to be omitted; which may be desirable for headers or footers.)
pREGEXP (This option causes only lines that match the specified regular expression ( REGEXP ) to be numbered.)

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

nl -d CC

A

use CC for logical page delimiters

–section-delimiter=CC

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

nl -n FORMAT

A
insert line numbers according to FORMAT
--number-format=FORMAT
format is:
ln (left justified; no leading zeros);
rn (right justified; no leading zeros);
rz (right justified with leading zeros).
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
33
Q

pr -NUMBER

A

output COLUMN columns and print columns down; unless -a is used
–columns=NUMBER
default is 80

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

pr -d

A

double space the output

–double-space

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

pr -f

A

use form feeds instead of newlines to separate pages (by a 3-line page header with -F or a 5-line header and trailer without -F)

  • -form-feed
  • F
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
36
Q

pr -l NUMBER

A

set the page length to PAGE_LENGTH (66) lines (default number of lines of text 56; and with -F 63). implies -t if PAGE_LENGTH <= 10
–length=NUMBER

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

pr -h STRING

A

use a centered STRING instead of filename in page header; -h “””” prints a blank line; don’t use -h””””
–header=STRING

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

pr -t

A

omit page headers and trailers; implied if PAGE_LENGTH <= 10

–omit-header

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

pr -o

A

offset each line with MARGIN (zero) spaces; do not affect -w or -W; MARGIN will be added to PAGE_WIDTH
–indent=NUMBER

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

pr -w NUMBER

A

set page width to NUMBER (72) characters for multiple text-column output only; -s[char] turns off (72)
–width=NUMBER

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

head -c NUMBER

A

print the first NUM bytes of each file; with the leading ‘-‘; print all but the last NUM bytes of each file
–bytes=[-]NUMBER

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

head -n NUMBER

A

print the first NUM lines instead of the first 10; with the leading ‘-‘; print all but the last NUM lines of each file
–lines=[-]NUMBER

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

tail -c NUMBER

A

output the last NUMBER bytes; or use -c +NUMBER to output starting with byte NUMBER of each file
–bytes=[+]NUMBER

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

tail -n NUMBER

A

output the last NUM lines; instead of the last 10; or use -n +NUM to output starting with line NUM
–lines=[+]NUMBER

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

tail -f

A

output appended data as the file grows;

–follow[={name|descriptor}]

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

tail –pid=NUMBER

A

with -f; terminate after process ID; PID dies

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

cut -b LIST

A

select only these bytes
–bytes=LIST
LIST can be a single number (such as 4 ); a closed range of numbers (such as 2-4 ); or an open range of numbers (such as -4 or 4- ).

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

cut -c LIST

A

select only these characters
–characters=LIST
LIST can be a single number (such as 4 ); a closed range of numbers (such as 2-4 ); or an open range of numbers (such as -4 or 4- ).

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

cut -f LIST

A

select only these fields; also print any line that contains no delimiter character; unless the -s option is specified
–fields=LIST
LIST can be a single number (such as 4 ); a closed range of numbers (such as 2-4 ); or an open range of numbers (such as -4 or 4- ).

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

cut -d STRING

A

use DELIM instead of TAB for field delimiter

–delimiter=STRING

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

cut -s

A

do not print lines not containing delimiters

–only-delimited

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

wc -l

A

print the newline counts

–lines

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

wc -w

A

print the word counts

–words

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

wc -c

A

print the byte counts

–bytes

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

wc -m

A

print the character counts

–chars

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

wc -L

A

print the maximum display width

–max-line-length

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

grep -c

A

Suppress normal output; instead print a count of matching lines for each input file. With the -v; –invert-match option (see below); count non-matching lines.
–count

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

grep -f STRING

A

Obtain patterns from file STRING; one per line. If this option is used multiple times or is combined with the -e (–regexp) option; search for all patterns given. The empty file contains zero patterns; and therefore matches nothing.
–file=STRING

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

grep -i

A

Ignore case distinctions; so that characters that differ only in case match each other.
–ignore-case

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

grep -r

A

Read all files under each directory; recursively; following symbolic links only if they are on the command line. Note that if no file operand is given; grep searches the working directory. This is equivalent to the -d recurse option.
–recursive
or use rgrep

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

grep -F

A

Interpret PATTERN as a list of fixed strings (instead of regular expressions); separated by newlines; any of which is to be matched.
–fixed-strings
or use fgrep

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

grep -E

A

Interpret PATTERN as an extended regular expression (ERE; see below).
–extended-regexp
or use egrep

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

sed =

A

Display the current line number

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

sed a\text

A

Append text to the file.

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

sed i\text

A

Insert text into the file

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

sed r filename

A

Append text from filename into the file

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

sed c\text

A

Replace the selected range of lines with the provided text

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

sed s/regexp/replacement/[g]

A

Replace text that matches the regular expression ( regexp ) with replacement

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

sed w filename

A

Write the current pattern space to the specified file.

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

sed q

A

Immediately quit the script; but print the current pattern space.

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

sed Q

A

Immediately quit the script.

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

rpm –root STRING

A

Modifies the Linux system having a root directory located at dir . This option can be used to maintain one Linux installation discrete from another one (say; during OS installation or emergency maintenance).

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

rpm –force

A

Forces installation of a package even when it means overwriting existing files or packages.
used with: -i ; -U ; -F

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

rpm -h

A

Displays a series of hash marks ( # ) to indicate the progress of the operation.
–hash
used with: -i ; -U ; -F

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

rpm -v

A

Used in conjunction with the -h option to produce a uniform number of hash marks for each package.
used with: -i ; -U ; -F

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

rpm –nodeps

A

Specifies that no dependency checks be performed. Installs or removes the package even if it relies on a package or file that’s not present or is required by a package that’s not being uninstalled.
used wih: -i ; -U ; -F ; -e

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

rpm –test

A

Checks for dependencies; conflicts; and other problems without actually installing the package.
used with: -i ; -U ; -F

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

rpm –prefix STRING

A

Sets the installation directory to STRING (works only for some packages).
used with: -i ; -U ; -F

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

rpm -a

A

Queries or verifies all packages.
–all
used with: -q ; -V

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

rpm -f STRING

A

Queries or verifies the package that owns file
–file STRING
used with: -q ; -V

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

rpm -p STRING

A

Queries the uninstalled RPM STRING

used with -q

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

rpm -i

A

Displays package information; including the package maintainer; a short description; and so on
used with -q

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

rpm -R

A

Displays the packages and files on which this one depends
–requires
used with -q

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

rpm -l

A

Displays the files contained in the package.
–list
used with -q

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

rpm -i

A

Installs a package; system must not contain a package of the same name

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

rpm -U

A

Installs a new package or upgrades an existing one

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

rpm -F

A

Upgrades a package only if an earlier version already exists

–freshen

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

rpm -q

A

Queries a package—finds whether a package is installed; what files it contains; and so on

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

rpm -v

A

Verifies a package—checks that its files are present and unchanged since installation
–verify

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

rpm -e

A

Uninstalls a package

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

rpm -b

A

Builds a binary package; given source code and configuration files; moved to the rpmbuild program with RPM version 4.2

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

rpm –rebuild

A

Builds a binary package; given a source RPM file; moved to the rpmbuild program with RPM version 4.2

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

rpm –rebuilddb

A

Rebuilds the RPM database to fix errors

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

cpio -i

A

extract an archive

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

cpio –make-directories

A

create directories

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

yum install

A

Installs one or more packages by package name. Also installs dependencies of the specified package or packages.

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

yum update

A

Updates the specified package or packages to the latest available version. If no packages are specified; yum updates every installed package.

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

yum check-update

A

Checks to see whether updates are available. If they are; yum displays their names; versions; and repository area ( updates or extras ; for instance).

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

yum upgrade

A

Works like update with the –obsoletes flag set; which handles obsolete packages in a way that’s superior when performing a distribution version upgrade

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

yum remove

A

Deletes a package from the system; similar to rpm -e ; but yum also removes depended-on packages
or erase

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

yum list

A

Displays information about a package; such as the installed version and whether an update is available

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

yum provides

A

Displays information about packages that provide a specified program or feature. For instance; typing yum provides samba lists all the Samba-related packages; including every available update. Note that the output can be copious.
or whatprovides

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

yum search

A

Searches package names; summaries; packagers; and descriptions for a specified keyword. This is useful if you don’t know a package’s name but can think of a word that’s likely to appear in one of these fields but not in these fields for other packages

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

yum info

A

Displays information about a package; similar to the rpm -qi command

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

yum clean

A

Cleans up the Yum cache directory. Running this command from time to time is advisable; lest downloaded packages chew up too much disk space.

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

yum shell

A

Enters the Yum shell mode; in which you can enter multiple Yum commands one after another

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

yum resolvedep

A

Displays packages matching the specified dependency.

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

yum localinstall

A

Installs the specified local RPM files; using your Yum repositories to resolve dependencies

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

yum localupdate

A

Updates the system using the specified local RPM files; using your Yum repositories to resolve dependencies. Packages other than those updated by local files and their dependencies are not updated

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

yum deplist

A

Displays dependencies of the specified package.

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

dpkg -i

A

Installs a package

–install

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

dpkg –configure

A

Reconfigures an installed package: runs the post-installation script to set site-specific options

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

dpkg -r

A

Removes a package but leaves configuration files intact

–remove

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

dpkg -P

A

Removes a package; including configuration files

–purge

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

dpkg –get-selections

A

Displays currently installed packages

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

dpkg -p

A

Displays information about an installed package

–print-avail

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

dpkg -I

A

Displays information about an uninstalled package file

–info

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

dpkg -l STRING

A

Lists all installed packages whose names match pattern

–list pattern

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

dpkg -L

A

Lists the installed files associated with a package

–listfiles

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

dpkg -S STRING

A

Locates the package(s) that own the file(s) specified by pattern
–search pattern

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

dpkg -c

A

pattern -C or –audit Searches for partially installed packages and suggests what to do with them
–audit

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

dpkg –root=STRING

A

Modifies the Linux system using a root directory located at STRING . Can be used to maintain one Linux installation discrete from another one; say during OS installation or emergency maintenance.
used with: all

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

dpkg -B

A

Disables packages that rely on one that is being removed.
–auto-deconfigure
used with -r

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

dpkg –force-things

A

Overrides defaults that would ordinarily cause dpkg to abort. Consult the dpkg man page for details of what (specified by things ) this option does.
used with: assorted

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

dpkg –ignore-depends=package

A

ignores dependency information for the specified package

used with: -i; -r

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

dpkg –no-act

A

Checks for dependencies; conflicts; and other problems without actually installing or removing the package
used with: -i; -r

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

dpkg –recursive

A

Installs all packages that match the package-name wildcard in the specified directory and all subdirectories
used with: -i

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

dpkg -G

A

Doesn’t install the package if a newer version of the same package is already installed.
used with: -i

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

dpkg -E

A

Doesn’t install the package if the same version of the package is already installed.
–skip-same-version
used with: -i

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

apt-cache showpkg

A

displays information about the packages listed on the command line.
eg: apt-cache showpkg samba

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

apt-cache stats

A

You can learn how many packages you’ve installed; how many dependencies are recorded; and various other statistics about the package database

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

apt-cache unmet

A

Find Unmet Dependencies

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

apt-cache depends

A

Display Dependencies

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

apt-cache pkgnames

A

Locate All Packages
If you include a second parameter; as in apt-cache pkgnames sa ; the program returns only those packages that begin with the specified string.

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

apt-get -d

A

Downloads package files but doesn’t install them.
–download-only
used with: upgrade ; dselect- upgrade ; install ; source

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

apt-get -f

A

Attempts to fix a system on which dependencies are unsatisfied.
–fix-broken
used with: install ; remove

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

apt-get -m

A

Ignores all package files that can’t be retrieved (because of network errors; missing files; or the like)
–ignore-missing ; or –fix-missing
used with: upgrade ; dselect- upgrade ; install ; remove ; source

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

apt-get -q

A

Omits some progress indicator information. May be doubled (for instance; -qq ) to produce still less progress information
–quiet
used with: all

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

apt-get -s

A

Performs a simulation of the action without actually modifying; installing; or removing files
–simulate ; –just- print ; –dry-run ; – recon ; or –no-act
used with: all

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

apt-get -y

A

Produces a ““yes’’ response to any yes/no prompt in installation scripts.
–yes ; or –assume- yes
used with: all

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

apt-get -b

A

Compiles a source package after retrieving it.
–compile; or –build
used with: source

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

apt-get –no-upgrade

A

auses apt-get to not upgrade a package if an older version is already installed.
used with: install

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

apt-get update

A

Obtains updated information about packages available from the installation sources listed in /etc/apt/sources.list .

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

apt-get upgrade

A

Upgrades all installed packages to the newest versions available; based on locally stored information about available packages.

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

apt-get dselect-upgrade

A

Performs any changes in package status (installation; removal; and so on) left undone after running dselect .

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

apt-get dist-upgrade

A

Similar to upgrade ; but performs ``smart’’ conflict resolution to avoid upgrading a package if doing so would break a dependency.

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

apt-get install

A

Installs a package by package name (not by package filename); obtaining the package from the source that contains the most up-to-date version.

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

apt-get remove

A

Removes a specified package by package name

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

apt-get source

A

Retrieves the newest available source package file by package filename using information about available packages and installation archives listed in /etc/apt/sources.list

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

apt-get check

A

Checks the package database for consistency and broken package installations

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

apt-get clean

A

Performs housekeeping to help clear out information about retrieved files from the Debian package database. If you don’t use dselect for package management; run this from time to time in order to save disk space.

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

apt-get autoclean

A

Similar to clean ; but removes information only about packages that can no longer be downloaded.

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

aptitude install STRING

A

install package STRING

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

aptitude install STRING-

A

uninstall package STRING

also remove STRING

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

aptitude remove STRING

A

uninstall package STRING

also install STRING-

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

aptitude full-upgrade

A

less conservative about removing packages in the upgrade process; and so it is more likely to complete its tasks. However; it may break software in the process.

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

aptitude safe-upgrade

A

conservative about removing packages or installing new ones and so may fail

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

aptitude search

A

earches the database for packages matching the specified name

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

aptitude autoclean

A

removes already-downloaded packages that are no longer available

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

aptitude clean

A

removes all downloaded packages

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

aptitude help

A

displays a complete list of options.

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

alien –to-deb

A

converts to debian

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

alien –to-rpm

A

converts to rpm

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

alien –to-tgz

A

converts to tgz

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

ldconfig -v

A

Display Verbose Information

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

ldconfig -N

A

causes ldconfig not to perform its primary duty of updating the library cache. It will; though; update symbolic links to libraries; which is a secondary duty of this program.

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

ldconfig -n

A

causes ldconfig to update the links contained in the directories specified on the command line. The system won’t examine the directories specified in /etc/ld.so.conf or the trusted directories ( /lib and /usr/lib )

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

ldconfig -X

A

the opposite of -N ; it causes ldconfig to update the cache but not manage links.

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

ldconfig -f STRING

A

change the configuration file from /etc/ld.so.conf to STRING

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

ldconfig -C STRING

A

change the cache file that ldconfig creates to STRING

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

ldconfig -r STRING

A

tells ldconfig to treat dir as if it were the root ( / ) directory. This option is helpful when you’re recovering a badly corrupted system or installing a new OS

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

ldconfig -p

A

Causes ldconfig to display the current cache—all of the library directories and the libraries they contain

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

uname -a

A

display all information

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

uname -n

A

displays the system’s node name; that is; its network hostname.
–nodename

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

uname -s

A

displays the kernel name; which is Linux on a Linux system

–kernel-name

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

uname -v

A

find the kernel version

–kernel-version

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

uname -r

A

The actual kernel version number

–kernel-release

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

uname -m

A

returns information about your machine. This is likely to be a CPU code; such as i686 or x86_64 .
–machine

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

uname -p

A

may return information about your CPU; such as the manufacturer; model; and clock speed; in practice; it returns unknown on many systems
–processor

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

uname -i

A

theoretically returns hardware platform information; this option often returns unknown
–hardware-platform

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

uname -o

A

returns the OS name—normally GNU/Linux for a Linux system

–operating-system

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

ps –help

A

Display Help

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

ps -A

A

Display All Processes

also -e

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

ps -e

A

Display All Processes

also -A

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

ps x

A

Lift the BSD-style ““must have a tty”” restriction;

displays all processes owned by the user who gives the command

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

ps -u STRING

A

display processes owned by user STRING
–User user
also U STRING
STRING may be a user name or uid

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

ps U STRING

A

display processes owned by user STRING
–User user
also U STRING
STRING may be a user name or uid

188
Q

ps -H

A

Display Process Hierarchy
–forest
also -f

189
Q

ps -f

A

Display Process Hierarchy
–forest
also -f

190
Q

ps -w

A

don’t truncate output at 80 columns

also w

191
Q

top -d NUMBER

A

how often top updates

defaults to 5 seconds

192
Q

top -p NUMBER

A

only display the listed processes
NUMBER is a pid
up to 20 pids can be listed

193
Q

top -n NUMBER

A

display NUMBER updates then quit

194
Q

top -b

A

specifies batch mode; in which top doesn’t use the normal screen-update commands. You might use this to log CPU use of targeted programs to a file; for instance

195
Q

top h while running

A

display help

also ?

196
Q

top k while running

A

kill a process

197
Q

top q while running

A

quit

198
Q

top r while running

A

change a process’s priority

199
Q

top s while running

A

changes the display’s update rate

200
Q

top P while running

A

sets the display to sort by CPU usage; which is the default

201
Q

top M while running

A

change the display to sort by memory usage with this command

202
Q

nice -n NUMBER

A

run the program with NUMBER niceness
also -NUMBER
–adjustment=NUMBER

203
Q

nice -NUMBER

A

run the program with NUMBER niceness
also -n NUMBER
–adjustment=NUMBER

204
Q

renice [-n] NUMBER

A

Specify the scheduling priority to be used for the process; process group; or user.
–priority NUMBER

205
Q

renice -p NUMBER

A

change niceness on the pid NUMBER

206
Q

renice -g NUMBER

A

change niceness on the gid NUMBER

207
Q

renice -u NUMBER

A

change niceness on the uid NUMBER

e.g. renice 7 16580 -u pdavison tbaker

208
Q

kill -l

A

List signal names

209
Q

kill -s STRING

A

specify the signal to send

common signals are 1(SIGHUP); 9(SIGKILL); 15(SIGTERM)

210
Q

killall -i

A

Interactively ask for confirmation before killing

–interactive

211
Q

lspci -v

A

Increases verbosity of output.

This option may be doubled ( -vv ) or tripled ( -vvv ) to produce yet more output

212
Q

lspci -n

A

Displays information in numeric codes rather than translating the codes to manufacturer and device names.

213
Q

lspci -nn

A

Displays both the manufacturer and device names and their associated numeric codes

214
Q

lspci -x

A

Displays the PCI configuration space for each device as a hexadecimal dump.
This is an extremely advanced option. Tripling ( -xxx ) or quadrupling ( -xxxx ) this option displays information about more devices

215
Q

lspci -b

A

hows IRQ numbers and other data as seen by devices rather than as seen by the kernel

216
Q

lspci -t

A

Displays a tree view depicting the relationship between devices

217
Q

lspci -s STRING

A

Displays only devices that match the listed specification. This can be used to trim the results of the output
-s [[[[ domain ]:] bus ]:] [ slot ][.[ func ]]

218
Q

lspci -d STRING

A

Shows data on the specified device.

-d [ vendor ]: [ device ]

219
Q

lspci -i STRING

A

Uses the specified file to map vendor and device IDs to names. (The default is /usr/share/misc/pci.ids .)

220
Q

lspci -m

A

Dumps data in a machine-readable form intended for use by scripts. A single -m uses a backward-compatible format; whereas doubling ( - mm ) uses a newer format

221
Q

lspci -D

A

Displays PCI domain numbers. These numbers normally aren’t displayed.

222
Q

lspci -M

A

Performs a scan in bus-mapping mode; which can reveal devices hidden behind a misconfigured PCI bridge. This is an advanced option that can be used only by root .

223
Q

lspci –version

A

Displays version information.

224
Q

modprobe -v

A

display extra information

–verbose

225
Q

modprobe -C STRING

A

This option overrides the default configuration directory (/etc/modprobe.d)
–config

226
Q

modprobe -n

A

This option does everything but actually insert or delete the modules
–dry-run
useful when combined with -v

227
Q

modprobe -r

A
Reverses modprobe 's usual effect; it causes the program to remove the specified module and any on which it depends
--remove
228
Q

modprobe -f

A
force the module loading even if the kernel version doesn't match what the module expects. This action is potentially dangerous
--force
229
Q

modprobe –show-depends

A

shows all of the modules on which the specified module depends

230
Q

modprobe -l STRING

A

displays a list of available options whose names match the wildcard you specify

  • -list
    eg. modprobe -l v* displays all modules whose names begin with v
231
Q

rmmod -v

A

display some extra information about what it’s doing

–verbose

232
Q

rmmod -f

A
forces module removal even if the module is marked as being in use. Naturally; this is a very dangerous option;
--force
233
Q

rmmod -w

A
wait for the module to become unused rather than return an error message if the module is in use. Once the module is no longer being used (say; after a bluetooth device is disconnected); rmmod unloads the module and returns
--wait
234
Q

lsusb -v

A

display more information

235
Q

lsusb -s STRING

A

restricts output to the specified bus and device number.

-s [[ bus ]:][ devnum ]

236
Q

lsusb -d STRING

A

restrict output to a particular vendor and product

-d [ vendor ]: [ product ]

237
Q

lsusb -D STRING

A

displays information about the device that’s accessible via filename ; which should be a file in the /proc/bus/usb directory tree

238
Q

lsusb -t

A

displays the device list as a tree so that you can see what devices are connected to specific controllers more easily

239
Q

lsusb -V

A

displays the version of the lsusb utility

–version

240
Q

fdisk -l

A

display the current partition table

241
Q

fdisk d while running

A

delete a partition

242
Q

fdisk m while running

A

display help

also ?

243
Q

fdisk t while running

A

change the partition type code

244
Q

fdisk l while running

A

display common partition type codes

245
Q

fdisk a while running

A

set the bootable flag

246
Q

fdisk q while running

A

exit

247
Q

fdisk w while running

A

save changes and exit

248
Q

gdisk print while running

A

display existing partitions

249
Q

mkfs -m NUMBER

A

sets the reserved-space percentage to NUMBER

250
Q

tune2fs -c NUMBER

A

Adjust the number of mounts after which the filesystem will be checked by e2fsck

251
Q

tune2fs -i NUMBER

A

Adjust the maximal time between two filesystem checks. No suffix or d will interpret the number interval-between-checks as days; m as months; and w as weeks. A value of zero will disable the time-dependent checking.

252
Q

tune2fs -j

A

converts ext2 to ext3

253
Q

tune2fs -r NUMBER

A

sets the reserved-space blocks to NUMBER

254
Q

xfs_admin -j

A

enable version 2 log (journal) format

255
Q

xfs_admin -l

A

obtain the filesystem’s label (name)

256
Q

xfs_admin -u

A

obtain the filesystem’s uuid

257
Q

xfs_admin -L STRING

A

set the filesystem’s label (name)

258
Q

xfs_admin -U STRING

A

set the filesystem’s uuid

259
Q

debugfs show_super_stats while running

A

produces superblock information; similar to what dumpe2fs displays
also stats

260
Q

debugfs stat STRING (while running)

A

display the inode data on a file or directory

STRING is the name of a file or directorhy

261
Q

debugfs undelete NUMBER STRING (while running)

A

undelete a file
also undel
NUMBER is the inode number and STRING is the name you want to give i

262
Q

debugfs lsdel (while running)

A

obtain a list of deleted inodes

also list_deleted_inodes

263
Q

debugfs write STRING1 STRING2 (while running)

A

extract a file from the filesystem
STRING1 is the name of a file in the filesystem that you’re manipulating and STRING2 is a filename on your main Linux system.

264
Q

debugfs list_requests (while running)

A

produces a summary of available commands

also lr; help; or ?

265
Q

debugfs quit

A

exit the program

266
Q

fsck -A

A

check all of the filesystems marked to be checked in /etc/fstab .

267
Q

fsck -c

A

displays a text-mode progress indicator of the check process

268
Q

fsck -v

A

produces verbose output of the check process

269
Q

fsck -N

A

display what it would normally do without actually doing it

270
Q

fsck -t STRING

A

causes the program to check only the specified filesystem types; even if others are marked to be checked
used with -A
If STRING is prefixed with no ; then all filesystems except the specified type are checked

271
Q

fsck –STRING

A

passes STRING to the underlying check program

272
Q

df -a

A

includes pseudo-filesystems with a size of 0 in the output. These filesystems may include /proc ; /sys ; /proc/bus/usb ; and others
–all

273
Q

df -h

A

scale and label its units

–human-readable

274
Q

df -H

A

scale and label its units using powers of 10

–si

275
Q

df -k

A

scale and label its units using kilobytes

–kilobytes

276
Q

df -m

A

scale and label its units using megabytes

–megabytes

277
Q

df -i

A

report on available and used inodes

–inodes

278
Q

df -l

A

omit network filesystems

–local

279
Q

df -T

A

display filesystem type

–print

280
Q

df -t STRING

A

displays only information about filesystems of the specified type
–type=STRING

281
Q

df -x STRING

A

don’t display information about filesystems of the specified type
–exclude=STRING

282
Q

du -a

A

report on individual files as well.

–all

283
Q

du -c

A

add a grand total to the end of its output

–total

284
Q

du -h

A

scale and label its units;

–human-readable

285
Q

du -H

A

scale and label its units using powers of 10

–si

286
Q

du -k

A

scale and label its units using kilobytes

–kilobytes

287
Q

du -m

A

scale and label its units using megabytes

–megabytes

288
Q

du -l

A

count the space each hardlink takes (useful if you want to burn to optical storage)
–count-links

289
Q

du –max-depth=NUMBER

A

limits the report to NUMBER levels

290
Q

du -s

A

equivalent to –max=depth=0

–summarize

291
Q

du -x

A

limits the report to the current filesystem. If another filesystem is mounted within the tree that you want summarized; its contents aren’t included in the report
–one-file-system

292
Q

mount -a

A

mount all of the filesystems listed in the /etc/fstab

293
Q

mount -r

A

mount the filesystem read-only

294
Q

mount -v

A

produces verbose output

295
Q

mount -w

A

mount the filesystem for both read and write

also: -o rw

296
Q

mount -t STRING

A

specify the filesystem type

297
Q

mount -L STRING

A

mount the filesystem whose label matches STRING

298
Q

mount -U STRING

A

mount the filesystem whose UUID matches STRING

299
Q

mount -o defaults

A

Causes the default options for this filesystem to be used. It’s used primarily in the /etc/fstab file to ensure that the file includes an options column
supported filesystems: all

300
Q

mount -o loop

A

Causes the loopback device for this mount to be used. Allows you to mount a file as if it were a disk partition. For instance; mount -t vfat -o loop image.img /mnt/image mounts the file image.img as if it were a disk
supported filesystems: all

301
Q

mount -o auto or noauto

A

Mounts or doesn’t mount the filesystem at boot time or when root issues the mount -a command. The default is auto ; but noauto is appropriate for removable media. Used in /etc/fstab
supported filesystems: all

302
Q

mount -o user or nouser

A

Allows or disallows ordinary users to mount the filesystem. The default is nouser ; but user is often appropriate for removable media. Used in /etc/fstab . When included in this file; user allows users to type mount /mountpoint (where / mountpoint is the assigned mount point) to mount a disk. Only the user who mounted the filesystem may unmount it.
supported filesystems: all

303
Q

mount -o users

A

Similar to user ; except that any user may unmount a filesystem once it’s been mounted.
supported filesystems: all

304
Q

mount -o owner

A

Similar to user ; except that the user must own the device file. Some distributions; such as Red Hat; assign ownership of some device files (such as /dev/fd0 for the floppy disk) to the console user; so this can be a helpful option
supported filesystems: all

305
Q

mount -o remount

A

Changes one or more mount options without explicitly unmounting a partition. To use this option; you issue a mount command on an already-mounted filesystem but with remount along with any options that you want to change. This feature can be used to enable or disable write access to a partition; for example
supported filesystems: all

306
Q

mount -o ro

A

Specifies a read-only mount of the filesystem. This is the default for filesystems that include no write access and for some with particularly unreliable write support
supported filesystems: all

307
Q

mount -o rw

A

Specifies a read/write mount of the filesystem. This is the default for most read/write filesystems
supported filesystems: All read/write filesystems

308
Q

mount -o uid=NUMBER

A

Sets the owner of all files. For instance; uid=1000 sets the owner to whomever has Linux user ID 1000. (Check Linux user IDs in the /etc/passwd file.)
supported filesystmes: Most filesystems that don’t support Unix-style permissions; such as vfat ; hpfs ; ntfs ; and hfs

309
Q

mount -o gid=value

A

Works like uid= value ; but sets the group of all files on the filesystem. You can find group IDs in the /etc/group file
supported filesystems: Most filesystems that don’t support Unix-style permissions; such as vfat ; hpfs ; ntfs ; and hfs

310
Q

mount -o umask=value

A

Sets the umask for the permissions on files. value is interpreted in binary as bits to be removed from permissions on files. For instance; umask=027 yields permissions of 750; or –rwxr-x— . Used in conjunction with uid= value and gid= value ; this option lets you control who can access files on FAT; HPFS; and many other foreign filesystems.
supported filesystems: Most filesystems that don’t support Unix-style permissions; such as vfat ; hpfs ; ntfs ; and hfs

311
Q

mount -o dmask=value

A

Similar to umask ; but sets the umask for directories only; not for files.
supported filesystems: Most filesystems that don’t support Unix-style permissions; such as vfat ; hpfs ; ntfs ; and hfs

312
Q

mount -o fmask=value

A

Similar to umask ; but sets the umask for files only; not for directories.
supported filesystems: Most filesystems that don’t support Unix-style permissions; such as vfat ; hpfs ; ntfs ; and hfs

313
Q

mount -o conv=code

A

If code is b or binary ; Linux doesn’t modify the files’ contents. If code is t or text ; Linux auto-converts files between Linux-style and Windows- or Macintosh-style end-of-line characters. If code is a or auto ; Linux applies the conversion unless the file is a known binary file format. It’s usually best to leave this at its default value of binary because file conversions can cause serious problems for some applications and file types.
supported filesystems: Most filesystems used on Microsoft and Apple OSs: msdos ; umsdos ; vfat ; hpfs ; and hfs

314
Q

mount -o norock

A

Disables Rock Ridge extensions for ISO-9660 CD-ROMs.

supported filesystems: iso9660

315
Q

mount -o nojoliet

A

Disables Joliet extensions for ISO-9660 CD-ROMs.

supported filesystems: iso9660

316
Q

umount -a

A

attempt to unmount all of the partitions listed in /etc/mtab

317
Q

umount -f

A

force an unmount operation that might otherwise fail. This feature is sometimes helpful when unmounting NFS mounts shared by servers that have become unreachable

318
Q

umount -r

A

if it can’t unmount a filesystem; it should attempt to remount it in read-only mode

319
Q

umount -t STRING

A

unmount only partitions of the specified type. You can list multiple filesystem types by separating them with commas.

320
Q

ls -F

A
append indicator (one of */=>@|) to entries
--classify
/ Directory
* Executable
| Named pipe
= Socket
@ Symbolic Link
321
Q

ls -a

A

show hidden files (dot)

–all

322
Q

ls -l

A

long listing

323
Q

ls –color

A

colored listing

324
Q

ls -d

A

only list the directory’s name; useful for globbing for directories
–directory

325
Q

ls -R

A

display directory contents recursively.

–recursive

326
Q

cp -f

A

overwrite any existing files without prompting

–force

327
Q

cp -i

A

prompt before overwriting

–interactive

328
Q

cp -p

A

preserves ownership and permissions; if possible

–preserve

329
Q

cp -R

A

copy recursively
–recursive
Although -r also performs a recursive copy; its behavior with files other than ordinary files and directories is unspecified. Most cp implementations use -r as a synonym for -R ; but this behavior isn’t guaranteed

330
Q

cp -a

A

similar to -R ; but it also preserves ownership and copies links as is. The -R option copies the files to which symbolic links point rather than the symbolic links themselves.
–archive

331
Q

cp -u

A

copy the file only if the original is newer than the target or if the target doesn’t exist
–update

332
Q

touch -a

A

change the access time alone; not the modification time

–time=atime

333
Q

touch -m

A

change the modification time alone; not the access time

–time=mtime

334
Q

touch -c

A

don’t create the file if it doesn’t exist

–no-create

335
Q

touch -t STRING

A

ets the time to the value specified by STRING

MMDDhhmm[[CC]YY][.ss]

336
Q

tar C

A

Changes to directory dir before performing operations

  • -directory
    eg. tar -xvzf bigfile.tar.gz -C /folder/subfolder/
337
Q

tar f

A

Uses the file called file on the computer called host as the archive file
–file [host:]file

338
Q

tar g STRING

A

Performs an incremental backup or restore; using file as a list of previously archived files
–listed- incremental file

339
Q

tar M

A

Creates or extracts a multi-volume archive

–multi- volume

340
Q

tar p

A

Preserves all protection information

–preserve- permissions

341
Q

tar P

A

Retains the leading / on filenames

–absolute- paths

342
Q

tar v

A

Lists all files read or extracted; when used with –list ; displays file sizes; ownership; and time stamps
–verbose

343
Q

tar W

A

Verifies the archive after writing it

–verify

344
Q

tar z

A

Compresses an archive with gzip

–gzip or – ungzip

345
Q

tar j

A

Compresses an archive with bzip2
–bzip2
some older versions used I or y

346
Q

tar J

A

Compresses an archive with xz

–xz

347
Q

tar c

A

Creates an archive

–create

348
Q

tar A

A

Appends tar files to an archive

–concatenate

349
Q

tar r

A

Appends non- tar files to an archive

–append

350
Q

tar u

A

Appends files that are newer than those in an archive

–update

351
Q

tar d

A

Compares an archive to files on disk

–diff or –compare

352
Q

tar t

A

Lists an archive’s contents

–list

353
Q

tar x

A

Extracts files from an archive

–extract or –get

354
Q

cpio -o

A

creates an archive and copies files into it

–create

355
Q

cpio -i

A

extracts data from an existing archive.

–extract

356
Q

cpio -p

A

combines the copy-out and copy-in modes; enabling you to copy a directory tree from one location to another.
–pass-through

357
Q

cpio -a

A

Resets the access time after reading a file so that it doesn’t appear to have been read.
–reset- access-time

358
Q

cpio -A

A

Appends data to an existing archive.

–append

359
Q

cpio -E STRING

A

Uses the contents of filename as a list of files to be extracted in copy-in mode.
–pattern-file=filename

360
Q

cpio -F STRING

A

Uses filename as the cpio archive file; if this parameter is omitted; cpio uses standard input or output.
–file=filename

361
Q

cpio -H STRING

A

Uses a specified format for the archive file. Common values for format include bin (the default; an old binary format); crc (a newer binary format with a checksum); and tar (the format used by tar ).
–format=format

362
Q

cpio -I STRING

A

Uses the filename specified by STRING instead of standard input. (Unlike -F ; this option does not redirect output data.)

363
Q

cpio –no-absolute-filenames

A

In copy-in mode; extracts files relative to the current directory; even if filenames in the archive contain full directory paths.

364
Q

cpio -o STRING

A

Uses the filename specified by STRING instead of standard output. (Unlike -F ; this option does not redirect input data.)

365
Q

cpio -t

A

Displays a table of contents for the input

–list

366
Q

cpio -u

A

Replaces all files without first asking for verification.

–unconditional

367
Q

cpio -v

A

Displays filenames as they’re added to or extracted from the archive. When used with -t ; displays additional listing information (similar to ls -l ).
–verbose

368
Q

dd if=STRING

A

use STRING as the input file

dd if=/dev/sda3 of=/dev/dvd

369
Q

dd of=STRING

A

use STRING as the output file

dd if=/dev/sda3 of=/dev/dvd

370
Q

dd bs=NUMBER

A

read the filesystem using a block size of NUMBER

1024 seems good

371
Q

dd count=NUMBER

A

read count*bs bytes from the input file

372
Q

ln -f

A

overwrite any existing files without prompting

–force

373
Q

ln -i

A

prompt before overwriting

–interactive

374
Q

ln -d

A

attempt to make a hard link to a directory
or -F or –directory
usually fails

375
Q

ln -s

A

make a symbolic link

–symbolic

376
Q

mkdir -m STRING

A

causes the new directory to have the specified permission mode; expressed as an octal number.
–mode=mode

377
Q

mkdir -p

A

create parent directories as needed

–parents

378
Q

rmdir –ignore-fail-on-non-empty

A

don’t display an error message if the directory isn’t empty

379
Q

rmdir -p

A

delete parent directories recursively

  • -parents
    eg. rmdir -p one/two/three
380
Q

chown -R

A

–recursive

381
Q

chmod u

A

set permissions for the owner

382
Q

chmod g

A

set permissions for the group

383
Q

chmod o

A

set permissions for all others (world)

384
Q

chmod a

A

set permissions for ugo

385
Q

chmod +

A

add permissions

386
Q

chmod -

A

remove permissions

387
Q

chmod =

A

set permissions equal to

388
Q

chmod r

A

read permission

389
Q

chmod w

A

write permission

390
Q

chmod x

A

execute permission

391
Q

chmod X

A

execute permission only if it’s already set

392
Q

chmod s

A

SUID or SGID

393
Q

chmod t

A

sticky bit

394
Q

chmod u

A

existing owner’s permissions

395
Q

chmod o

A

existing other permissions

396
Q

umask -S

A

display permissions that will not be removed from files/folder symbolically
e.g. u=rwx;g=rx;o=rx

397
Q

newgrp -l

A

reinitializes the environment as if the user had just logged in

398
Q

chattr [+-]A

A

Linux won’t update the access time stamp when you access a file. This can reduce disk input/output; which is particularly helpful for saving battery life on laptops.

399
Q

chattr [+-]a

A

disables write access to the file except for appending data.

400
Q

chattr [+-]c

A

causes the kernel to compress data written to the file automatically and uncompress it when it’s read back.

401
Q

chattr [+-]i

A

cannot be modified: it cannot be deleted or renamed; no link can be created to this file and no data can be written to the file.

402
Q

chattr [+-]j

A

tells the kernel to journal all data written to the file. This improves recoverability of data written to the file after a system crash but can slow performance. This flag has no effect on ext2 filesystems.

403
Q

chattr [+-]s

A

when the file is deleted; the kernel zeros its data blocks

404
Q

chattr [+-]t

A

disables this behavior: small data pieces at a file’s end that don’t fill a complete block are merged with similar pieces of data from other files

405
Q

quotacheck -c

A

create aquota.user and aquota.group files

406
Q

quotacheck -u

A

check user quotas

407
Q

quotacheck -g

A

check group quotas

408
Q

edquota -t

A

sets the soft limit grace period
0 disables it
grace periods are per filesystem, not per user

409
Q

edquota -g STRING

A

edit the quota for the group STRING

410
Q

quota -g

A

display group quotas

411
Q

quota -l

A

omits NFS mounts

412
Q

quota -q

A

limits output to filesystems on which usage is over the limit

413
Q

find -perm NUMBER

A

find files that have the specified permissions
also symbolically
e.g. -perm g=w

414
Q

find -perm +NUMBER

A

find files that have any of the specified permission bits set

415
Q

find -size NUMBER

A
locate files that use NUMBER units of space; rounding up
NUMBER is specified in 512k blocks
trail with c for bytes
trail with k for kibibytes
trail with M for Mebibytes
416
Q

find -size +NUMBER

A

locate files larger than NUMBER units of space; rounding up

417
Q

find -size -NUMBER

A

locate files less than NUMBER units of space; rounding up

418
Q

find -gid NUMBER

A

locates files whose gid matches GID

419
Q

find -group STRING

A

locate files whose group matches STRING

420
Q

find -uid NUMBER

A

locates files whose uid matches UID

421
Q

find -user STRING

A

locate files whose owner matches STRING

422
Q

find -maxdepth NUMBER

A

only recuse NUMBER directories

423
Q

which -a

A

show all matches

424
Q

type -t

A

shortens the output to builtin ; file ; alias ; or other short identifiers.

425
Q

type -a

A

provides a complete list; for instance; it provides both the alias expansion and the location of the ultimate executable when provided with an alias name.

426
Q

chkconfig –list

A

list the services and their applicable runlevels

427
Q

chkconfig –level NUMBER STRING1 STRING2

A

set the STRING1 program to on or off (STRING2) on the runlevels specified in NUMBER with no delimiters
chkconfig –level 23 nfs-common on

428
Q

chkconfig –add STRING

A

adds the STRING script to those managed by chkconfig
This approach may not work if the script lacks the necessary comment lines with runlevel sequence numbers for chkconfig ‘s benefit

429
Q

shutdown now

A

shutdown now

430
Q

shutdown -c

A

cancel a pending shutdown

431
Q

shutdown -r

A

reboot

432
Q

shutdown -H

A

halt

433
Q

shutdown -P

A

power off

434
Q

shutdown -h

A

usually powers off; may halt

435
Q

systemctl list-units

A

Displays the current status of all configured units.

436
Q

systemctl default

A

Changes to the default target uni

437
Q

systemctl isolate

A

Starts the named unit and stops all others.
systemctl isolate rescue.target
go into single user mode

438
Q

systemctl start STRING

A

Starts the named unit.

439
Q

systemctl stop STRING

A

Stops the named unit.

440
Q

systemctl reload STRING

A

Causes the named unit to reload its configuration file.

441
Q

systemctl restart STRING

A

Causes the named unit to shut down and restart.

442
Q

systemctl status STRING

A

Displays the status of the named unit. (You can pass a PID value; rather than a name; if you like.)

443
Q

systemctl enable STRING

A

Configures the unit to start when the computer next boots.

444
Q

systemctl disable STRING

A

Configures the unit not to start when the computer next boots.

445
Q

vi commands while running o

A

opens a new line immediately below the current line; moves the cursor to that line; and enters insert mode

446
Q

vi commands while running #yy

A

copy # lines

447
Q

vi commands while running #dd

A

cut # lines

448
Q

vi commands while running yw

A

copy from cursor to end of word

449
Q

vi commands while running dw

A

cut from cursor to end of word

450
Q

vi commands while running p

A

paste

451
Q

vi commands while running R

A

enter text replacement mode

452
Q

vi commands while running a

A

enter insert mode and advance the cursor 1 space

453
Q

vi commands while running ZZ

A

:wq

454
Q

vi commands while running ~

A

change case under cursor and advance 1

455
Q

vi commands while running u

A

undo

456
Q

vi commands while running o

A

inserts a new line immediately below the current one and enters insert mode on that line

457
Q

vi commands while running /

A

search forward for text

458
Q

vi commands while running ?

A

search backward for text

459
Q

vi commands while running cw

A

clear from cursor to the end of the word and enter insert mode

460
Q

vi commands while running cc

A

clear line and enter insert mode

461
Q

vi commands while running #G

A

go to line #

462
Q

vi commands while running H

A

move cursor to top of screen

463
Q

vi commands while running L

A

move cursor to bottom of screen

464
Q

vi commands while running :%s/STRING1/STRING2/g

A

replace STRING1 with STRING2 globally
remove g to do the first occurance on each line
to do only lines 3 through 5; replace % with 3,5

465
Q

vi commands while running :e STRING

A

load file STRING for editing

closes the currently open file

466
Q

vi commands while running :r STRING

A

load file STRING on the line after the cursor

467
Q

vi commands while running :!STRING

A

run external command STRING

:!ls runs ls ; enabling you to see what files are present in the current directory