tag:blogger.com,1999:blog-285399532024-03-06T16:20:54.002+11:00Tech TabsThis site contain my study notes which relate to information technology.Justinhttp://www.blogger.com/profile/10774510706045215599noreply@blogger.comBlogger94125tag:blogger.com,1999:blog-28539953.post-38196237286361346642012-01-21T16:34:00.000+11:002012-01-21T16:34:35.116+11:00M900 Transmission update<div><ul><li>Download the latest version of Transmission and libevent from <a href="http://ipkg.nslu2-linux.org/feeds/optware/oleg/cross/stable/">http://ipkg.nslu2-linux.org/feeds/optware/oleg/cross/stable/</a></li>
<li>Find out the IP address of the EAGET M900.</li>
<li>Enable the NAS function on the M900 box than execute command explorer \\ipaddress from strat/run menu.</li>
<li>Copy and paste the two files downloaded before to poped up filemanager</li>
<li>Use putty open a telnet session to the IP address of M900</li>
</ul></div><br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTvhw_e_Soyu5-Fg_xr2XSdmq38V4ud5hkUGMfXSK-xsvIIZ18LeoMYIJrNo7ritBmsbL1npkVrjV0PCu7JPpsPnH4Cpyxp0IuBQHRDZN3UPz1blYNYhjoWROawR3RYT872tFLDw/s1600/putty+telnet.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="309" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTvhw_e_Soyu5-Fg_xr2XSdmq38V4ud5hkUGMfXSK-xsvIIZ18LeoMYIJrNo7ritBmsbL1npkVrjV0PCu7JPpsPnH4Cpyxp0IuBQHRDZN3UPz1blYNYhjoWROawR3RYT872tFLDw/s320/putty+telnet.png" width="320" /></a></div><div><ul><li>Logo in as root and go to directory of the two uploaded files. by execute cd \tmp\hdd\volume\HDD1\directory name</li>
<li>execute ipkg-lc install packagename.ipk -force-reinstall </li>
<li>Add your PC's IP address to the whitelist section of configuration file settings.json which in directory /tmp/hdd/root/etc/transmission. If there are more than one IP address, separate by :</li>
<li>Reboot the M900 then test the transmission.</li>
</ul></div><div><br />
</div>Justinhttp://www.blogger.com/profile/10774510706045215599noreply@blogger.com0tag:blogger.com,1999:blog-28539953.post-34184626733043727572012-01-21T16:13:00.000+11:002012-01-21T16:13:18.019+11:00M900 BT Guide<ul><li>To download BT files using M900, you need first get bt seed "*.torrent" file ready. </li>
</ul><br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjD5IWCfgLmEgUAX1zJna9SqibTn9IU2RmZFbMaJW8NuSO91L44fevQFujbqlUhh1nlm7Xhnbch7pe92YaF5xBqahqL2zj5miChpNHQF7m2qv3HQtWPMKOQCG9EFU7LCGUnejBUw/s1600/2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="55" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjD5IWCfgLmEgUAX1zJna9SqibTn9IU2RmZFbMaJW8NuSO91L44fevQFujbqlUhh1nlm7Xhnbch7pe92YaF5xBqahqL2zj5miChpNHQF7m2qv3HQtWPMKOQCG9EFU7LCGUnejBUw/s320/2.png" width="320" /></a></div><br />
<br />
<br />
<ul><li>fire up your internet browser, type in http://10.0.0.42:9091(replace 10.0.0.42 with your M900 ip address).</li>
<li>click "Open" which on the top left of the page.Then press "Choose Files" button and select your *.torrent file in the pop up window. </li>
</ul><br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1NIjBsgmUQyQv0AsS8f46lI-oJ8vi2EleRXb9lf-sYvyFEUeToMz3OGPB7O9c8YtntdkYjmMMbZ0FHkWdfqWN-rkDF48lE61ounMvnai26FqFl418n1uOAh-Qo5rzC1eRfM2t9A/s1600/4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="172" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1NIjBsgmUQyQv0AsS8f46lI-oJ8vi2EleRXb9lf-sYvyFEUeToMz3OGPB7O9c8YtntdkYjmMMbZ0FHkWdfqWN-rkDF48lE61ounMvnai26FqFl418n1uOAh-Qo5rzC1eRfM2t9A/s320/4.png" width="320" /></a></div><br />
<br />
<br />
<ul><li>finally make sure "start when added" is ticked before press the "Upload" button. see in 3.png</li>
</ul><br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiE24lLK_rGYA4vyh8tLTm-APpEjkJP5-aq274spUtROmpbf6xr6y9XgLlxXdxlSvDOfYH0DOBJZAETCcc3_z1kSEWRRkqHiht_E2xDokac1T-VZbIfNTCs-tg2ougxqxdTS4625w/s1600/3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="130" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiE24lLK_rGYA4vyh8tLTm-APpEjkJP5-aq274spUtROmpbf6xr6y9XgLlxXdxlSvDOfYH0DOBJZAETCcc3_z1kSEWRRkqHiht_E2xDokac1T-VZbIfNTCs-tg2ougxqxdTS4625w/s320/3.png" width="320" /></a></div><br />
<br />
<ul><li>Now you could see the downloading status in the web page. </li>
</ul><br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_5LFh-4w3BmH6N66sGV2kjF1hoBSnsO4CUEbbtXhf0BsNohfr-7WL01iXZnI8nioxBPwVWqVr0l6Ux1I9mPyEkYNcn6f71bD3sMNaXcD-kkcBNMHDXRU7zKsSVnsW9ty1t9Fs1w/s1600/1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="108" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_5LFh-4w3BmH6N66sGV2kjF1hoBSnsO4CUEbbtXhf0BsNohfr-7WL01iXZnI8nioxBPwVWqVr0l6Ux1I9mPyEkYNcn6f71bD3sMNaXcD-kkcBNMHDXRU7zKsSVnsW9ty1t9Fs1w/s320/1.png" width="320" /></a></div><br />
<ol><div class="separator" style="clear: both; text-align: center;"></div></ol><span style="color: #888888;"><br />
</span><br />
<ol></ol>Justinhttp://www.blogger.com/profile/10774510706045215599noreply@blogger.com0tag:blogger.com,1999:blog-28539953.post-62143124563026517382010-07-27T23:34:00.000+10:002010-07-27T23:34:55.072+10:00Examples of chown<ul><li>Change the ownership to dodo and the group dodo on a file named test.txt<br />
chown dodo:dodo test.txt</li>
</ul>Justinhttp://www.blogger.com/profile/10774510706045215599noreply@blogger.com0tag:blogger.com,1999:blog-28539953.post-35686361941927930832010-07-27T23:31:00.002+10:002010-07-27T23:31:55.035+10:00Man Page of chownNAME<br />
chown - change file owner and group<br />
<br />
SYNOPSIS<br />
chown [OPTION]... [OWNER][:[GROUP]] FILE...<br />
chown [OPTION]... --reference=RFILE FILE...<br />
<br />
DESCRIPTION<br />
This manual page documents the GNU version of chown. chown changes the<br />
user and/or group ownership of each given file. If only an owner (a<br />
user name or numeric user ID) is given, that user is made the owner of<br />
each given file, and the files' group is not changed. If the owner is<br />
followed by a colon and a group name (or numeric group ID), with no<br />
spaces between them, the group ownership of the files is changed as<br />
well. If a colon but no group name follows the user name, that user is<br />
made the owner of the files and the group of the files is changed to<br />
that user's login group. If the colon and group are given, but the<br />
owner is omitted, only the group of the files is changed; in this case,<br />
chown performs the same function as chgrp. If only a colon is given,<br />
or if the entire operand is empty, neither the owner nor the group is<br />
changed.<br />
<br />
OPTIONS<br />
Change the owner and/or group of each FILE to OWNER and/or GROUP. With<br />
--reference, change the owner and group of each FILE to those of RFILE.<br />
<br />
-c, --changes<br />
like verbose but report only when a change is made<br />
<br />
--dereference<br />
affect the referent of each symbolic link (this is the default),<br />
rather than the symbolic link itself<br />
<br />
-h, --no-dereference<br />
affect each symbolic link instead of any referenced file (useful<br />
only on systems that can change the ownership of a symlink)<br />
<br />
--from=CURRENT_OWNER:CURRENT_GROUP<br />
change the owner and/or group of each file only if its current<br />
owner and/or group match those specified here. Either may be<br />
omitted, in which case a match is not required for the omitted<br />
attribute.<br />
<br />
--no-preserve-root<br />
do not treat `/' specially (the default)<br />
<br />
--preserve-root<br />
fail to operate recursively on `/'<br />
<br />
-f, --silent, --quiet<br />
suppress most error messages<br />
<br />
--reference=RFILE<br />
use RFILE's owner and group rather than specifying OWNER:GROUP<br />
values<br />
<br />
-R, --recursive<br />
operate on files and directories recursively<br />
<br />
-v, --verbose<br />
output a diagnostic for every file processed<br />
<br />
The following options modify how a hierarchy is traversed when the -R<br />
option is also specified. If more than one is specified, only the<br />
final one takes effect.<br />
<br />
-H if a command line argument is a symbolic link to a directory,<br />
traverse it<br />
<br />
-L traverse every symbolic link to a directory encountered<br />
<br />
-P do not traverse any symbolic links (default)<br />
<br />
--help display this help and exit<br />
<br />
--version<br />
output version information and exit<br />
<br />
Owner is unchanged if missing. Group is unchanged if missing, but<br />
changed to login group if implied by a `:' following a symbolic OWNER.<br />
OWNER and GROUP may be numeric as well as symbolic.<br />
<br />
EXAMPLES<br />
chown root /u<br />
Change the owner of /u to "root".<br />
<br />
chown root:staff /u<br />
Likewise, but also change its group to "staff".<br />
<br />
chown -hR root /u<br />
Change the owner of /u and subfiles to "root".<br />
<br />
AUTHOR<br />
Written by David MacKenzie and Jim Meyering.<br />
<br />
REPORTING BUGS<br />
Report chown bugs to bug-coreutils@gnu.org<br />
GNU coreutils home page: <http: coreutils="" software="" www.gnu.org=""><br />
General help using GNU software: <http: gethelp="" www.gnu.org=""><br />
<br />
COPYRIGHT<br />
Copyright © 2009 Free Software Foundation, Inc. License GPLv3+: GNU<br />
GPL version 3 or later <http: gnu.org="" gpl.html="" licenses="">.<br />
This is free software: you are free to change and redistribute it.<br />
There is NO WARRANTY, to the extent permitted by law.<br />
<br />
SEE ALSO<br />
chown(2)<br />
<br />
The full documentation for chown is maintained as a Texinfo manual. If<br />
the info and chown programs are properly installed at your site, the<br />
command<br />
<br />
info coreutils 'chown invocation'<br />
<br />
should give you access to the complete manual.<br />
<br />
<br />
<br />
GNU coreutils 7.1 October 2009 CHOWN(1)</http:></http:></http:><br />
<br />
<br />
<br />
<br />
<br />
<a href="http://techtabs.blogspot.com/p/linux.html">Back to linux LPIC1 Exam Objectives</a>Justinhttp://www.blogger.com/profile/10774510706045215599noreply@blogger.com0tag:blogger.com,1999:blog-28539953.post-30026398063448809352010-07-27T22:15:00.002+10:002010-07-27T22:15:54.758+10:00Man Page of quotaonNAME<br />
quotaon, quotaoff - turn filesystem quotas on and off<br />
<br />
SYNOPSIS<br />
/sbin/quotaon [ -vugfp ] [ -F format-name ] filesystem...<br />
/sbin/quotaon [ -avugfp ] [ -F format-name ]<br />
<br />
/sbin/quotaoff [ -vugp ] [ -x state ] filesystem...<br />
/sbin/quotaoff [ -avugp ]<br />
<br />
DESCRIPTION<br />
quotaon<br />
quotaon announces to the system that disk quotas should be enabled on<br />
one or more filesystems. The filesystem quota files must be present in<br />
the root directory of the specified filesystem and be named either<br />
aquota.user (for version 2 user quota), quota.user (for version 1 user<br />
quota), aquota.group (for version 2 group quota), or quota.group (for<br />
version 1 group quota).<br />
<br />
XFS filesystems are a special case - XFS considers quota information as<br />
filesystem metadata and uses journaling to provide a higher level guar-<br />
antee of consistency. There are two components to the XFS disk quota<br />
system: accounting and limit enforcement. XFS filesystems require that<br />
quota accounting be turned on at mount time. It is possible to enable<br />
and disable limit enforcement on an XFS filesystem after quota account-<br />
ing is already turned on. The default is to turn on both accounting<br />
and enforcement.<br />
<br />
The XFS quota implementation does not maintain quota information in<br />
user-visible files, but rather stores this information internally.<br />
<br />
quotaoff<br />
quotaoff announces to the system that the specified filesystems should<br />
have any disk quotas turned off.<br />
<br />
OPTIONS<br />
quotaon<br />
-F, --format=format-name<br />
Report quota for specified format (ie. don't perform format<br />
autodetection). Possible format names are: vfsold (version 1<br />
quota), vfsv0 (version 2 quota), xfs (quota on XFS filesystem)<br />
<br />
-a, --all<br />
All automatically mounted (no noauto option) non-NFS filesystems<br />
in /etc/fstab with quotas will have their quotas turned on.<br />
This is normally used at boot time to enable quotas.<br />
<br />
-v, --verbose<br />
Display a message for each filesystem where quotas are turned<br />
on.<br />
<br />
-u, --user<br />
Manipulate user quotas. This is the default.<br />
<br />
-g, --group<br />
Manipulate group quotas.<br />
<br />
-p, --print-state<br />
Instead of turning quotas on just print state of quotas (ie.<br />
whether. quota is on or off)<br />
<br />
-f, --off<br />
Make quotaon behave like being called as quotaoff.<br />
<br />
quotaoff<br />
-F, --format=format-name<br />
Report quota for specified format (ie. don't perform format<br />
autodetection). Possible format names are: vfsold (version 1<br />
quota), vfsv0 (version 2 quota), xfs (quota on XFS filesystem)<br />
<br />
-a, --all<br />
Force all filesystems in /etc/fstab to have their quotas dis-<br />
abled.<br />
<br />
-v, --verbose<br />
Display a message for each filesystem affected.<br />
<br />
-u, --user<br />
Manipulate user quotas. This is the default.<br />
<br />
-g, --group<br />
Manipulate group quotas.<br />
<br />
-p, --print-state<br />
Instead of turning quotas off just print state of quotas (ie.<br />
whether. quota is on or off)<br />
<br />
-x, --xfs-command delete<br />
Free up the space used to hold quota information (maintained<br />
internally) within XFS. This option is only applicable to XFS,<br />
and is silently ignored for other filesystem types. It can only<br />
be used on a filesystem with quota previously turned off.<br />
<br />
-x, --xfs-command enforce<br />
Switch on/off limit enforcement for XFS filesystems (perform<br />
quota accounting only). This option is only applicable to XFS,<br />
and is silently ignored for other filesystem types.<br />
<br />
NOTES ON XFS FILESYSTEMS<br />
To enable quotas on an XFS filesystem, use mount(8) or /etc/fstab quota<br />
option to enable both accounting and limit enforcement. quotaon util-<br />
ity cannot be used for this purpose.<br />
<br />
Turning on quotas on an XFS root filesystem requires the quota mount<br />
options be passed into the kernel at boot time through the Linux root-<br />
flags boot option.<br />
<br />
To turn off quota limit enforcement on any XFS filesystem, first make<br />
sure that quota accounting and enforcement are both turned on using<br />
repquota -v filesystem. Then, use quotaoff -v filesystem to disable<br />
limit enforcement. This may be done while the filesystem is mounted.<br />
<br />
Turning on quota limit enforcement on an XFS filesystem is achieved<br />
using quotaon -v filesystem. This may be done while the filesystem is<br />
mounted.<br />
<br />
FILES<br />
aquota.user or aquota.group<br />
quota file at the filesystem root (version 2 quota,<br />
non-XFS filesystems)<br />
quota.user or quota.group<br />
quota file at the filesystem root (version 1 quota,<br />
non-XFS filesystems)<br />
/etc/fstab default filesystems<br />
<br />
SEE ALSO<br />
quotactl(2), fstab(5), quota_nld(8), repquota(8), warnquota(8)<br />
<br />
<br />
<br />
4th Berkeley Distribution QUOTAON(8)<br />
<br />
<br />
<a href="http://techtabs.blogspot.com/p/linux.html">Back to linux LPIC1 Exam Objectives</a>Justinhttp://www.blogger.com/profile/10774510706045215599noreply@blogger.com0tag:blogger.com,1999:blog-28539953.post-66230860857938991402010-07-27T22:14:00.000+10:002010-07-27T22:14:31.209+10:00Man Page of repquotaNAME<br />
repquota - summarize quotas for a filesystem<br />
<br />
SYNOPSIS<br />
/usr/sbin/repquota [ -vspiug ] [ -c | -C ] [ -t | -n ] [ -F format-name<br />
] filesystem...<br />
<br />
/usr/sbin/repquota [ -avtpsiug ] [ -c | -C ] [ -t | -n ] [ -F format-<br />
name ]<br />
<br />
DESCRIPTION<br />
repquota prints a summary of the disc usage and quotas for the speci-<br />
fied file systems. For each user the current number of files and<br />
amount of space (in kilobytes) is printed, along with any quotas cre-<br />
ated with edquota(8). As repquota has to translate ids of all<br />
users/groups to names (unless option -n was specified) it may take a<br />
while to print all the information. To make translating as fast as pos-<br />
sible repquota tries to detect (by reading /etc/nsswitch.conf) whether<br />
entries are stored in standard plain text file or in database and<br />
either translates chunks of 1024 names or each name individually. You<br />
can override this autodetection by -c or -C options.<br />
<br />
OPTIONS<br />
-a, --all<br />
Report on all filesystems indicated in /etc/mtab to be read-<br />
write with quotas.<br />
<br />
-v, --verbose<br />
Report all quotas, even if there is no usage. Be also more ver-<br />
bose about quotafile information.<br />
<br />
-c, --batch-translation<br />
Cache entries to report and translate uids/gids to names in big<br />
chunks by scanning all users (default). This is good (fast)<br />
behaviour when using /etc/passwd file.<br />
<br />
-C, --no-batch-translation<br />
Translate individual entries. This is faster when you have users<br />
stored in database.<br />
<br />
-t, --truncate-names<br />
Truncate user/group names longer than 9 characters. This results<br />
in nicer output when there are such names.<br />
<br />
-n, --no-names<br />
Don't resolve UIDs/GIDs to names. This can speedup printing a<br />
lot.<br />
<br />
-s, --human-readable<br />
Try to report used space, number of used inodes and limits in<br />
more appropriate units than the default ones.<br />
<br />
-p, --raw-grace<br />
When user is in grace period, report time in seconds since epoch<br />
when his grace time runs out (or has run out). Field is '0' when<br />
no grace time is in effect. This is especially useful when<br />
parsing output by a script.<br />
<br />
-i, --no-autofs<br />
Ignore mountpoints mounted by automounter.<br />
<br />
-F, --format=format-name<br />
Report quota for specified format (ie. don't perform format<br />
autodetection). Possible format names are: vfsold (version 1<br />
quota), vfsv0 (version 2 quota), xfs (quota on XFS filesystem)<br />
<br />
-g, --group<br />
Report quotas for groups.<br />
<br />
-u, --user<br />
Report quotas for users. This is the default.<br />
<br />
Only the super-user may view quotas which are not their own.<br />
<br />
FILES<br />
aquota.user or aquota.group<br />
quota file at the filesystem root (version 2 quota,<br />
non-XFS filesystems)<br />
quota.user or quota.group<br />
quota file at the filesystem root (version 1 quota,<br />
non-XFS filesystems)<br />
/etc/mtab default filesystems<br />
/etc/passwd default set of users<br />
/etc/group default set of groups<br />
<br />
SEE ALSO<br />
quota(1), quotactl(2), edquota(8), quotacheck(8), quotaon(8),<br />
quota_nld(8), setquota(8), warnquota(8)<br />
<br />
4th Berkeley Distribution REPQUOTA(8)<br />
<br />
<br />
<a href="http://techtabs.blogspot.com/p/linux.html">Back to linux LPIC1 Exam Objectives</a>Justinhttp://www.blogger.com/profile/10774510706045215599noreply@blogger.com0tag:blogger.com,1999:blog-28539953.post-31905492149808889682010-07-27T22:12:00.000+10:002010-07-27T22:12:44.568+10:00Man Page of edquotaNAME<br />
edquota - edit user quotas<br />
<br />
SYNOPSIS<br />
edquota [ -p protoname ] [ -u | -g ] [ -rm ] [ -F format-name ] [ -f<br />
filesystem ] username...<br />
<br />
edquota [ -u | -g ] [ -F format-name ] [ -f filesystem ] -t<br />
<br />
edquota [ -u | -g ] [ -F format-name ] [ -f filesystem ] -T username |<br />
groupname...<br />
<br />
DESCRIPTION<br />
edquota is a quota editor. One or more users or groups may be speci-<br />
fied on the command line. If a number is given in the place of<br />
user/group name it is treated as an UID/GID. For each user or group a<br />
temporary file is created with an ASCII representation of the current<br />
disk quotas for that user or group and an editor is then invoked on the<br />
file. The quotas may then be modified, new quotas added, etc. Setting<br />
a quota to zero indicates that no quota should be imposed.<br />
<br />
Users are permitted to exceed their soft limits for a grace period that<br />
may be specified per filesystem. Once the grace period has expired,<br />
the soft limit is enforced as a hard limit.<br />
<br />
The current usage information in the file is for informational pur-<br />
poses; only the hard and soft limits can be changed.<br />
<br />
Upon leaving the editor, edquota reads the temporary file and modifies<br />
the binary quota files to reflect the changes made.<br />
<br />
The editor invoked is vi(1) unless either the EDITOR or the VISUAL<br />
environment variable specifies otherwise.<br />
<br />
Only the super-user may edit quotas.<br />
<br />
OPTIONS<br />
-r, --remote<br />
Edit also non-local quota use rpc.rquotad on remote server to<br />
set quota. This option is available only if quota tools were<br />
compiled with enabled support for setting quotas over RPC. The<br />
-n option is equivalent, and is maintained for backward compati-<br />
bility.<br />
<br />
-m, --no-mixed-pathnames<br />
Currently, pathnames of NFSv4 mountpoints are sent without lead-<br />
ing slash in the path. rpc.rquotad uses this to recognize NFSv4<br />
mounts and properly prepend pseudoroot of NFS filesystem to the<br />
path. If you specify this option, setquota will always send<br />
paths with a trailing slash. This can be useful for legacy rea-<br />
sons but be aware that quota over RPC will stop working if you<br />
are using new rpc.rquotad.<br />
<br />
-u, --user<br />
Edit the user quota. This is the default.<br />
<br />
-g, --group<br />
Edit the group quota.<br />
<br />
-p, --prototype=protoname<br />
Duplicate the quotas of the prototypical user specified for each<br />
user specified. This is the normal mechanism used to initialize<br />
quotas for groups of users.<br />
<br />
-F, --format=format-name<br />
Edit quota for specified format (ie. don't perform format<br />
autodetection). Possible format names are: vfsold (version 1<br />
quota), vfsv0 (version 2 quota), rpc (quota over NFS), xfs<br />
(quota on XFS filesystem)<br />
<br />
-f, --filesystem filesystem<br />
Perform specified operations only for given filesystem (default<br />
is to perform operations for all filesystems with quota).<br />
<br />
-t, --edit-period<br />
Edit the soft time limits for each filesystem. In old quota<br />
format if the time limits are zero, the default time limits in<br />
<linux quota.h=""> are used. In new quota format time limits must<br />
be specified (there is no default value set in kernel). Time<br />
units of 'seconds', 'minutes', 'hours', and 'days' are under-<br />
stood. Time limits are printed in the greatest possible time<br />
unit such that the value is greater than or equal to one.<br />
<br />
-T, --edit-times<br />
Edit time for the user/group when softlimit is enforced. Possi-<br />
ble values are 'unset' or number and unit. Units are the same as<br />
in -t option.<br />
<br />
FILES<br />
aquota.user or aquota.group<br />
quota file at the filesystem root (version 2 quota,<br />
non-XFS filesystems)<br />
quota.user or quota.group<br />
quota file at the filesystem root (version 1 quota,<br />
non-XFS filesystems)<br />
/etc/mtab mounted filesystems table<br />
<br />
SEE ALSO<br />
quota(1), vi(1), quotactl(2), quotacheck(8), quotaon(8), repquota(8),<br />
setquota(8)<br />
<br />
<br />
<a href="http://techtabs.blogspot.com/p/linux.html">Back to linux LPIC1 Exam Objectives</a><br />
</linux>Justinhttp://www.blogger.com/profile/10774510706045215599noreply@blogger.com0tag:blogger.com,1999:blog-28539953.post-19887678358825466152010-07-27T22:10:00.000+10:002010-07-27T22:10:42.882+10:00Man Page of quotaQUOTA(1) QUOTA(1)<br />
<br />
<br />
<br />
NAME<br />
quota - display disk usage and limits<br />
<br />
SYNOPSIS<br />
quota [ -F format-name ] [ -guqvswi ] [ -l | [ -QAm ]]<br />
quota [ -F format-name ] [ -qvswi ] [ -l | [ -QAm ]] -u user...<br />
quota [ -F format-name ] [ -qvswi ] [ -l | [ -QAm ]] -g group...<br />
quota [ -F format-name ] [ -qvswugQm ] -f filesystem...<br />
<br />
DESCRIPTION<br />
quota displays users' disk usage and limits. By default only the user<br />
quotas are printed.<br />
<br />
quota reports the quotas of all the filesystems listed in /etc/mtab.<br />
For filesystems that are NFS-mounted a call to the rpc.rquotad on the<br />
server machine is performed to get the information.<br />
<br />
OPTIONS<br />
-F, --format=format-name<br />
Show quota for specified format (ie. don't perform format<br />
autodetection). Possible format names are: vfsold (version 1<br />
quota), vfsv0 (version 2 quota), rpc (quota over NFS), xfs<br />
(quota on XFS filesystem)<br />
<br />
-g, --group<br />
Print group quotas for the group of which the user is a member.<br />
The optional group argument(s) restricts the display to the<br />
specified group(s).<br />
<br />
-u, --user<br />
flag is equivalent to the default.<br />
<br />
-v, --verbose<br />
will display quotas on filesystems where no storage is allo-<br />
cated.<br />
<br />
-s, --human-readable<br />
option will make quota(1) try to choose units for showing lim-<br />
its, used space and used inodes.<br />
<br />
-p, --raw-grace<br />
When user is in grace period, report time in seconds since epoch<br />
when his grace time runs out (or has run out). Field is '0' when<br />
no grace time is in effect. This is especially useful when<br />
parsing output by a script.<br />
<br />
-i, --no-autofs<br />
ignore mountpoints mounted by automounter<br />
<br />
-l, --local-only<br />
report quotas only on local filesystems (ie. ignore NFS mounted<br />
filesystems).<br />
<br />
-A, --all-nfs<br />
report quotas for all NFS filesystems even if they report to be<br />
on the same device.<br />
<br />
-m, --no-mixed-pathnames<br />
Currently, pathnames of NFSv4 mountpoints are sent without lead-<br />
ing slash in the path. rpc.rquotad uses this to recognize NFSv4<br />
mounts and properly prepend pseudoroot of NFS filesystem to the<br />
path. If you specify this option, setquota will always send<br />
paths with a trailing slash. This can be useful for legacy rea-<br />
sons but be aware that quota over RPC will stop working if you<br />
are using new rpc.rquotad.<br />
<br />
-q, --quiet<br />
Print a more terse message, containing only information on<br />
filesystems where usage is over quota.<br />
<br />
-Q, --quiet-refuse<br />
Do not print error message if connection to rpc.rquotad is<br />
refused (usually this happens when rpc.rquotad is not running on<br />
the server).<br />
<br />
-w, --no-wrap<br />
Do not wrap the line if the device name is too long. This can be<br />
useful when parsing the output of quota(1) by a script.<br />
<br />
Specifying both -g and -u displays both the user quotas and the group<br />
quotas (for the user).<br />
<br />
Only the super-user may use the -u flag and the optional user argument<br />
to view the limits of other users. Non-super-users can use the the -g<br />
flag and optional group argument to view only the limits of groups of<br />
which they are members.<br />
<br />
The -q flag takes precedence over the -v flag.<br />
<br />
DIAGNOSTICS<br />
If quota exits with a non-zero status, one or more filesystems are over<br />
quota.<br />
<br />
FILES<br />
aquota.user or aquota.group<br />
quota file at the filesystem root (version 2 quota,<br />
non-XFS filesystems)<br />
quota.user or quota.group<br />
quota file at the filesystem root (version 1 quota,<br />
non-XFS filesystems)<br />
/etc/mtab default filesystems<br />
<br />
SEE ALSO<br />
quotactl(2), fstab(5), edquota(8), quotacheck(8), quotaon(8),<br />
quota_nld(8), repquota(8),<br />
<br />
<a href="http://techtabs.blogspot.com/p/linux.html">Back to linux LPIC1 Exam Objectives</a>Justinhttp://www.blogger.com/profile/10774510706045215599noreply@blogger.com0tag:blogger.com,1999:blog-28539953.post-77641265113941524762010-07-26T23:11:00.001+10:002010-07-26T23:12:46.344+10:00examples of grep<ul><li>Only display lines containing capital letters <br />
grep -n [A-Z] name.txt</li>
<li> </li>
</ul><a href="http://techtabs.blogspot.com/p/linux.html">Back to linux LPIC1 Exam Objectives</a> <br />
<ul></ul>Justinhttp://www.blogger.com/profile/10774510706045215599noreply@blogger.com0tag:blogger.com,1999:blog-28539953.post-51943866681682660032010-07-26T23:00:00.001+10:002010-07-26T23:02:18.766+10:00Man Page of grepNAME<br />
grep, egrep, fgrep - print lines matching a pattern<br />
<br />
SYNOPSIS<br />
grep [OPTIONS] PATTERN [FILE...]<br />
grep [OPTIONS] [-e PATTERN | -f FILE] [FILE...]<br />
<br />
DESCRIPTION<br />
grep searches the named input FILEs (or standard input if no files are<br />
named, or if a single hyphen-minus (-) is given as file name) for lines<br />
containing a match to the given PATTERN. By default, grep prints the<br />
matching lines.<br />
<br />
In addition, two variant programs egrep and fgrep are available. egrep<br />
is the same as grep -E. fgrep is the same as grep -F. Direct<br />
invocation as either egrep or fgrep is deprecated, but is provided to<br />
allow historical applications that rely on them to run unmodified.<br />
<br />
OPTIONS<br />
Generic Program Information<br />
--help Print a usage message briefly summarizing these command-line<br />
options and the bug-reporting address, then exit.<br />
<br />
-V, --version<br />
Print the version number of grep to the standard output stream.<br />
This version number should be included in all bug reports (see<br />
below).<br />
<br />
Matcher Selection<br />
-E, --extended-regexp<br />
Interpret PATTERN as an extended regular expression (ERE, see<br />
below). (-E is specified by POSIX.)<br />
<br />
-F, --fixed-strings<br />
Interpret PATTERN as a list of fixed strings, separated by<br />
newlines, any of which is to be matched. (-F is specified by<br />
POSIX.)<br />
<br />
-G, --basic-regexp<br />
Interpret PATTERN as a basic regular expression (BRE, see<br />
below). This is the default.<br />
<br />
-P, --perl-regexp<br />
Interpret PATTERN as a Perl regular expression. This is highly<br />
experimental and grep -P may warn of unimplemented features.<br />
<br />
Matching Control<br />
-e PATTERN, --regexp=PATTERN<br />
Use PATTERN as the pattern. This can be used to specify<br />
multiple search patterns, or to protect a pattern beginning with<br />
a hyphen (-). (-e is specified by POSIX.)<br />
<br />
-f FILE, --file=FILE<br />
Obtain patterns from FILE, one per line. The empty file<br />
contains zero patterns, and therefore matches nothing. (-f is<br />
specified by POSIX.)<br />
<br />
-i, --ignore-case<br />
Ignore case distinctions in both the PATTERN and the input<br />
files. (-i is specified by POSIX.)<br />
<br />
-v, --invert-match<br />
Invert the sense of matching, to select non-matching lines. (-v<br />
is specified by POSIX.)<br />
<br />
-w, --word-regexp<br />
Select only those lines containing matches that form whole<br />
words. The test is that the matching substring must either be<br />
at the beginning of the line, or preceded by a non-word<br />
constituent character. Similarly, it must be either at the end<br />
of the line or followed by a non-word constituent character.<br />
Word-constituent characters are letters, digits, and the<br />
underscore.<br />
<br />
-x, --line-regexp<br />
Select only those matches that exactly match the whole line.<br />
(-x is specified by POSIX.)<br />
<br />
-y Obsolete synonym for -i.<br />
<br />
General Output Control<br />
-c, --count<br />
Suppress normal output; instead print a count of matching lines<br />
for each input file. With the -v, --invert-match option (see<br />
below), count non-matching lines. (-c is specified by POSIX.)<br />
<br />
--color[=WHEN], --colour[=WHEN]<br />
Surround the matched (non-empty) strings, matching lines,<br />
context lines, file names, line numbers, byte offsets, and<br />
separators (for fields and groups of context lines) with escape<br />
sequences to display them in color on the terminal. The colors<br />
are defined by the environment variable GREP_COLORS. The<br />
deprecated environment variable GREP_COLOR is still supported,<br />
but its setting does not have priority. WHEN is never, always,<br />
or auto.<br />
<br />
-L, --files-without-match<br />
Suppress normal output; instead print the name of each input<br />
file from which no output would normally have been printed. The<br />
scanning will stop on the first match.<br />
<br />
-l, --files-with-matches<br />
Suppress normal output; instead print the name of each input<br />
file from which output would normally have been printed. The<br />
scanning will stop on the first match. (-l is specified by<br />
POSIX.)<br />
<br />
-m NUM, --max-count=NUM<br />
Stop reading a file after NUM matching lines. If the input is<br />
standard input from a regular file, and NUM matching lines are<br />
output, grep ensures that the standard input is positioned to<br />
just after the last matching line before exiting, regardless of<br />
the presence of trailing context lines. This enables a calling<br />
process to resume a search. When grep stops after NUM matching<br />
lines, it outputs any trailing context lines. When the -c or<br />
--count option is also used, grep does not output a count<br />
greater than NUM. When the -v or --invert-match option is also<br />
used, grep stops after outputting NUM non-matching lines.<br />
<br />
-o, --only-matching<br />
Print only the matched (non-empty) parts of a matching line,<br />
with each such part on a separate output line.<br />
<br />
-q, --quiet, --silent<br />
Quiet; do not write anything to standard output. Exit<br />
immediately with zero status if any match is found, even if an<br />
error was detected. Also see the -s or --no-messages option.<br />
(-q is specified by POSIX.)<br />
<br />
-s, --no-messages<br />
Suppress error messages about nonexistent or unreadable files.<br />
Portability note: unlike GNU grep, 7th Edition Unix grep did not<br />
conform to POSIX, because it lacked -q and its -s option behaved<br />
like GNU grep's -q option. USG-style grep also lacked -q but<br />
its -s option behaved like GNU grep. Portable shell scripts<br />
should avoid both -q and -s and should redirect standard and<br />
error output to /dev/null instead. (-s is specified by POSIX.)<br />
<br />
Output Line Prefix Control<br />
-b, --byte-offset<br />
Print the 0-based byte offset within the input file before each<br />
line of output. If -o (--only-matching) is specified, print the<br />
offset of the matching part itself.<br />
<br />
-H, --with-filename<br />
Print the file name for each match. This is the default when<br />
there is more than one file to search.<br />
<br />
-h, --no-filename<br />
Suppress the prefixing of file names on output. This is the<br />
default when there is only one file (or only standard input) to<br />
search.<br />
<br />
--label=LABEL<br />
Display input actually coming from standard input as input<br />
coming from file LABEL. This is especially useful for tools<br />
like zgrep, e.g., gzip -cd foo.gz | grep --label=foo something<br />
<br />
-n, --line-number<br />
Prefix each line of output with the 1-based line number within<br />
its input file. (-n is specified by POSIX.)<br />
<br />
-T, --initial-tab<br />
Make sure that the first character of actual line content lies<br />
on a tab stop, so that the alignment of tabs looks normal. This<br />
is useful with options that prefix their output to the actual<br />
content: -H,-n, and -b. In order to improve the probability<br />
that lines from a single file will all start at the same column,<br />
this also causes the line number and byte offset (if present) to<br />
be printed in a minimum size field width.<br />
<br />
-u, --unix-byte-offsets<br />
Report Unix-style byte offsets. This switch causes grep to<br />
report byte offsets as if the file were a Unix-style text file,<br />
i.e., with CR characters stripped off. This will produce<br />
results identical to running grep on a Unix machine. This<br />
option has no effect unless -b option is also used; it has no<br />
effect on platforms other than MS-DOS and MS-Windows.<br />
<br />
-Z, --null<br />
Output a zero byte (the ASCII NUL character) instead of the<br />
character that normally follows a file name. For example, grep<br />
-lZ outputs a zero byte after each file name instead of the<br />
usual newline. This option makes the output unambiguous, even<br />
in the presence of file names containing unusual characters like<br />
newlines. This option can be used with commands like find<br />
-print0, perl -0, sort -z, and xargs -0 to process arbitrary<br />
file names, even those that contain newline characters.<br />
<br />
Context Line Control<br />
-A NUM, --after-context=NUM<br />
Print NUM lines of trailing context after matching lines.<br />
Places a line containing a group separator (--) between<br />
contiguous groups of matches. With the -o or --only-matching<br />
option, this has no effect and a warning is given.<br />
<br />
-B NUM, --before-context=NUM<br />
Print NUM lines of leading context before matching lines.<br />
Places a line containing a group separator (--) between<br />
contiguous groups of matches. With the -o or --only-matching<br />
option, this has no effect and a warning is given.<br />
<br />
-C NUM, -NUM, --context=NUM<br />
Print NUM lines of output context. Places a line containing a<br />
group separator (--) between contiguous groups of matches. With<br />
the -o or --only-matching option, this has no effect and a<br />
warning is given.<br />
<br />
File and Directory Selection<br />
-a, --text<br />
Process a binary file as if it were text; this is equivalent to<br />
the --binary-files=text option.<br />
<br />
--binary-files=TYPE<br />
If the first few bytes of a file indicate that the file contains<br />
binary data, assume that the file is of type TYPE. By default,<br />
TYPE is binary, and grep normally outputs either a one-line<br />
message saying that a binary file matches, or no message if<br />
there is no match. If TYPE is without-match, grep assumes that<br />
a binary file does not match; this is equivalent to the -I<br />
option. If TYPE is text, grep processes a binary file as if it<br />
were text; this is equivalent to the -a option. Warning: grep<br />
--binary-files=text might output binary garbage, which can have<br />
nasty side effects if the output is a terminal and if the<br />
terminal driver interprets some of it as commands.<br />
<br />
-D ACTION, --devices=ACTION<br />
If an input file is a device, FIFO or socket, use ACTION to<br />
process it. By default, ACTION is read, which means that<br />
devices are read just as if they were ordinary files. If ACTION<br />
is skip, devices are silently skipped.<br />
<br />
-d ACTION, --directories=ACTION<br />
If an input file is a directory, use ACTION to process it. By<br />
default, ACTION is read, which means that directories are read<br />
just as if they were ordinary files. If ACTION is skip,<br />
directories are silently skipped. If ACTION is recurse, grep<br />
reads all files under each directory, recursively; this is<br />
equivalent to the -r option.<br />
<br />
--exclude=GLOB<br />
Skip files whose base name matches GLOB (using wildcard<br />
matching). A file-name glob can use *, ?, and [...] as<br />
wildcards, and \ to quote a wildcard or backslash character<br />
literally.<br />
<br />
--exclude-from=FILE<br />
Skip files whose base name matches any of the file-name globs<br />
read from FILE (using wildcard matching as described under<br />
--exclude).<br />
<br />
--exclude-dir=DIR<br />
Exclude directories matching the pattern DIR from recursive<br />
searches.<br />
<br />
-I Process a binary file as if it did not contain matching data;<br />
this is equivalent to the --binary-files=without-match option.<br />
<br />
--include=GLOB<br />
Search only files whose base name matches GLOB (using wildcard<br />
matching as described under --exclude).<br />
<br />
-R, -r, --recursive<br />
Read all files under each directory, recursively; this is<br />
equivalent to the -d recurse option.<br />
<br />
Other Options<br />
--line-buffered<br />
Use line buffering on output. This can cause a performance<br />
penalty.<br />
<br />
--mmap If possible, use the mmap(2) system call to read input, instead<br />
of the default read(2) system call. In some situations, --mmap<br />
yields better performance. However, --mmap can cause undefined<br />
behavior (including core dumps) if an input file shrinks while<br />
grep is operating, or if an I/O error occurs.<br />
<br />
-U, --binary<br />
Treat the file(s) as binary. By default, under MS-DOS and MS-<br />
Windows, grep guesses the file type by looking at the contents<br />
of the first 32KB read from the file. If grep decides the file<br />
is a text file, it strips the CR characters from the original<br />
file contents (to make regular expressions with ^ and $ work<br />
correctly). Specifying -U overrules this guesswork, causing all<br />
files to be read and passed to the matching mechanism verbatim;<br />
if the file is a text file with CR/LF pairs at the end of each<br />
line, this will cause some regular expressions to fail. This<br />
option has no effect on platforms other than MS-DOS and MS-<br />
Windows.<br />
<br />
-z, --null-data<br />
Treat the input as a set of lines, each terminated by a zero<br />
byte (the ASCII NUL character) instead of a newline. Like the<br />
-Z or --null option, this option can be used with commands like<br />
sort -z to process arbitrary file names.<br />
<br />
REGULAR EXPRESSIONS<br />
A regular expression is a pattern that describes a set of strings.<br />
Regular expressions are constructed analogously to arithmetic<br />
expressions, by using various operators to combine smaller expressions.<br />
<br />
grep understands two different versions of regular expression syntax:<br />
“basic” and “extended.” In GNU grep, there is no difference in<br />
available functionality using either syntax. In other implementations,<br />
basic regular expressions are less powerful. The following description<br />
applies to extended regular expressions; differences for basic regular<br />
expressions are summarized afterwards.<br />
<br />
The fundamental building blocks are the regular expressions that match<br />
a single character. Most characters, including all letters and digits,<br />
are regular expressions that match themselves. Any meta-character with<br />
special meaning may be quoted by preceding it with a backslash.<br />
<br />
The period . matches any single character.<br />
<br />
Character Classes and Bracket Expressions<br />
A bracket expression is a list of characters enclosed by [ and ]. It<br />
matches any single character in that list; if the first character of<br />
the list is the caret ^ then it matches any character not in the list.<br />
For example, the regular expression [0123456789] matches any single<br />
digit.<br />
<br />
Within a bracket expression, a range expression consists of two<br />
characters separated by a hyphen. It matches any single character that<br />
sorts between the two characters, inclusive, using the locale's<br />
collating sequence and character set. For example, in the default C<br />
locale, [a-d] is equivalent to [abcd]. Many locales sort characters in<br />
dictionary order, and in these locales [a-d] is typically not<br />
equivalent to [abcd]; it might be equivalent to [aBbCcDd], for example.<br />
To obtain the traditional interpretation of bracket expressions, you<br />
can use the C locale by setting the LC_ALL environment variable to the<br />
value C.<br />
<br />
Finally, certain named classes of characters are predefined within<br />
bracket expressions, as follows. Their names are self explanatory, and<br />
they are [:alnum:], [:alpha:], [:cntrl:], [:digit:], [:graph:],<br />
[:lower:], [:print:], [:punct:], [:space:], [:upper:], and [:xdigit:].<br />
For example, [[:alnum:]] means [0-9A-Za-z], except the latter form<br />
depends upon the C locale and the ASCII character encoding, whereas the<br />
former is independent of locale and character set. (Note that the<br />
brackets in these class names are part of the symbolic names, and must<br />
be included in addition to the brackets delimiting the bracket<br />
expression.) Most meta-characters lose their special meaning inside<br />
bracket expressions. To include a literal ] place it first in the<br />
list. Similarly, to include a literal ^ place it anywhere but first.<br />
Finally, to include a literal - place it last.<br />
<br />
Anchoring<br />
The caret ^ and the dollar sign $ are meta-characters that respectively<br />
match the empty string at the beginning and end of a line.<br />
<br />
The Backslash Character and Special Expressions<br />
The symbols \< and \> respectively match the empty string at the<br />
beginning and end of a word. The symbol \b matches the empty string at<br />
the edge of a word, and \B matches the empty string provided it's not<br />
at the edge of a word. The symbol \w is a synonym for [[:alnum:]] and<br />
\W is a synonym for [^[:alnum:]].<br />
<br />
Repetition<br />
A regular expression may be followed by one of several repetition<br />
operators:<br />
? The preceding item is optional and matched at most once.<br />
* The preceding item will be matched zero or more times.<br />
+ The preceding item will be matched one or more times.<br />
{n} The preceding item is matched exactly n times.<br />
{n,} The preceding item is matched n or more times.<br />
{,m} The preceding item is matched at most m times.<br />
{n,m} The preceding item is matched at least n times, but not more<br />
than m times.<br />
<br />
Concatenation<br />
Two regular expressions may be concatenated; the resulting regular<br />
expression matches any string formed by concatenating two substrings<br />
that respectively match the concatenated expressions.<br />
<br />
Alternation<br />
Two regular expressions may be joined by the infix operator |; the<br />
resulting regular expression matches any string matching either<br />
alternate expression.<br />
<br />
Precedence<br />
Repetition takes precedence over concatenation, which in turn takes<br />
precedence over alternation. A whole expression may be enclosed in<br />
parentheses to override these precedence rules and form a<br />
subexpression.<br />
<br />
Back References and Subexpressions<br />
The back-reference \n, where n is a single digit, matches the substring<br />
previously matched by the nth parenthesized subexpression of the<br />
regular expression.<br />
<br />
Basic vs Extended Regular Expressions<br />
In basic regular expressions the meta-characters ?, +, {, |, (, and )<br />
lose their special meaning; instead use the backslashed versions \?,<br />
\+, \{, \|, \(, and \).<br />
<br />
Traditional egrep did not support the { meta-character, and some egrep<br />
implementations support \{ instead, so portable scripts should avoid {<br />
in grep -E patterns and should use [{] to match a literal {.<br />
<br />
GNU grep -E attempts to support traditional usage by assuming that { is<br />
not special if it would be the start of an invalid interval<br />
specification. For example, the command grep -E '{1' searches for the<br />
two-character string {1 instead of reporting a syntax error in the<br />
regular expression. POSIX.2 allows this behavior as an extension, but<br />
portable scripts should avoid it.<br />
<br />
ENVIRONMENT VARIABLES<br />
The behavior of grep is affected by the following environment<br />
variables.<br />
<br />
The locale for category LC_foo is specified by examining the three<br />
environment variables LC_ALL, LC_foo, LANG, in that order. The first<br />
of these variables that is set specifies the locale. For example, if<br />
LC_ALL is not set, but LC_MESSAGES is set to pt_BR, then the Brazilian<br />
Portuguese locale is used for the LC_MESSAGES category. The C locale<br />
is used if none of these environment variables are set, if the locale<br />
catalog is not installed, or if grep was not compiled with national<br />
language support (NLS).<br />
<br />
GREP_OPTIONS<br />
This variable specifies default options to be placed in front of<br />
any explicit options. For example, if GREP_OPTIONS is<br />
'--binary-files=without-match --directories=skip', grep behaves<br />
as if the two options --binary-files=without-match and<br />
--directories=skip had been specified before any explicit<br />
options. Option specifications are separated by whitespace. A<br />
backslash escapes the next character, so it can be used to<br />
specify an option containing whitespace or a backslash.<br />
<br />
GREP_COLOR<br />
This variable specifies the color used to highlight matched<br />
(non-empty) text. It is deprecated in favor of GREP_COLORS, but<br />
still supported. The mt, ms, and mc capabilities of GREP_COLORS<br />
have priority over it. It can only specify the color used to<br />
highlight the matching non-empty text in any matching line (a<br />
selected line when the -v command-line option is omitted, or a<br />
context line when -v is specified). The default is 01;31, which<br />
means a bold red foreground text on the terminal's default<br />
background.<br />
<br />
GREP_COLORS<br />
Specifies the colors and other attributes used to highlight<br />
various parts of the output. Its value is a colon-separated<br />
list of capabilities that defaults to<br />
ms=01;31:mc=01;31:sl=:cx=:fn=35:ln=32:bn=32:se=36 with the rv<br />
and ne boolean capabilities omitted (i.e., false). Supported<br />
capabilities are as follows.<br />
<br />
sl= SGR substring for whole selected lines (i.e., matching<br />
lines when the -v command-line option is omitted, or non-<br />
matching lines when -v is specified). If however the<br />
boolean rv capability and the -v command-line option are<br />
both specified, it applies to context matching lines<br />
instead. The default is empty (i.e., the terminal's<br />
default color pair).<br />
<br />
cx= SGR substring for whole context lines (i.e., non-matching<br />
lines when the -v command-line option is omitted, or<br />
matching lines when -v is specified). If however the<br />
boolean rv capability and the -v command-line option are<br />
both specified, it applies to selected non-matching lines<br />
instead. The default is empty (i.e., the terminal's<br />
default color pair).<br />
<br />
rv Boolean value that reverses (swaps) the meanings of the<br />
sl= and cx= capabilities when the -v command-line option<br />
is specified. The default is false (i.e., the capability<br />
is omitted).<br />
<br />
mt=01;31<br />
SGR substring for matching non-empty text in any matching<br />
line (i.e., a selected line when the -v command-line<br />
option is omitted, or a context line when -v is<br />
specified). Setting this is equivalent to setting both<br />
ms= and mc= at once to the same value. The default is a<br />
bold red text foreground over the current line<br />
background.<br />
<br />
ms=01;31<br />
SGR substring for matching non-empty text in a selected<br />
line. (This is only used when the -v command-line option<br />
is omitted.) The effect of the sl= (or cx= if rv)<br />
capability remains active when this kicks in. The<br />
default is a bold red text foreground over the current<br />
line background.<br />
<br />
mc=01;31<br />
SGR substring for matching non-empty text in a context<br />
line. (This is only used when the -v command-line option<br />
is specified.) The effect of the cx= (or sl= if rv)<br />
capability remains active when this kicks in. The<br />
default is a bold red text foreground over the current<br />
line background.<br />
<br />
fn=35 SGR substring for file names prefixing any content line.<br />
The default is a magenta text foreground over the<br />
terminal's default background.<br />
<br />
ln=32 SGR substring for line numbers prefixing any content<br />
line. The default is a green text foreground over the<br />
terminal's default background.<br />
<br />
bn=32 SGR substring for byte offsets prefixing any content<br />
line. The default is a green text foreground over the<br />
terminal's default background.<br />
<br />
se=36 SGR substring for separators that are inserted between<br />
selected line fields (:), between context line fields,<br />
(-), and between groups of adjacent lines when nonzero<br />
context is specified (--). The default is a cyan text<br />
foreground over the terminal's default background.<br />
<br />
ne Boolean value that prevents clearing to the end of line<br />
using Erase in Line (EL) to Right (\33[K) each time a<br />
colorized item ends. This is needed on terminals on<br />
which EL is not supported. It is otherwise useful on<br />
terminals for which the back_color_erase (bce) boolean<br />
terminfo capability does not apply, when the chosen<br />
highlight colors do not affect the background, or when EL<br />
is too slow or causes too much flicker. The default is<br />
false (i.e., the capability is omitted).<br />
<br />
Note that boolean capabilities have no =... part. They are<br />
omitted (i.e., false) by default and become true when specified.<br />
<br />
See the Select Graphic Rendition (SGR) section in the<br />
documentation of the text terminal that is used for permitted<br />
values and their meaning as character attributes. These<br />
substring values are integers in decimal representation and can<br />
be concatenated with semicolons. grep takes care of assembling<br />
the result into a complete SGR sequence (\33[...m). Common<br />
values to concatenate include 1 for bold, 4 for underline, 5 for<br />
blink, 7 for inverse, 39 for default foreground color, 30 to 37<br />
for foreground colors, 90 to 97 for 16-color mode foreground<br />
colors, 38;5;0 to 38;5;255 for 88-color and 256-color modes<br />
foreground colors, 49 for default background color, 40 to 47 for<br />
background colors, 100 to 107 for 16-color mode background<br />
colors, and 48;5;0 to 48;5;255 for 88-color and 256-color modes<br />
background colors.<br />
<br />
LC_ALL, LC_COLLATE, LANG<br />
These variables specify the locale for the LC_COLLATE category,<br />
which determines the collating sequence used to interpret range<br />
expressions like [a-z].<br />
<br />
LC_ALL, LC_CTYPE, LANG<br />
These variables specify the locale for the LC_CTYPE category,<br />
which determines the type of characters, e.g., which characters<br />
are whitespace.<br />
<br />
LC_ALL, LC_MESSAGES, LANG<br />
These variables specify the locale for the LC_MESSAGES category,<br />
which determines the language that grep uses for messages. The<br />
default C locale uses American English messages.<br />
<br />
POSIXLY_CORRECT<br />
If set, grep behaves as POSIX.2 requires; otherwise, grep<br />
behaves more like other GNU programs. POSIX.2 requires that<br />
options that follow file names must be treated as file names; by<br />
default, such options are permuted to the front of the operand<br />
list and are treated as options. Also, POSIX.2 requires that<br />
unrecognized options be diagnosed as “illegal”, but since they<br />
are not really against the law the default is to diagnose them<br />
as “invalid”. POSIXLY_CORRECT also disables<br />
_N_GNU_nonoption_argv_flags_, described below.<br />
<br />
_N_GNU_nonoption_argv_flags_<br />
(Here N is grep's numeric process ID.) If the ith character of<br />
this environment variable's value is 1, do not consider the ith<br />
operand of grep to be an option, even if it appears to be one.<br />
A shell can put this variable in the environment for each<br />
command it runs, specifying which operands are the results of<br />
file name wildcard expansion and therefore should not be treated<br />
as options. This behavior is available only with the GNU C<br />
library, and only when POSIXLY_CORRECT is not set.<br />
<br />
EXIT STATUS<br />
Normally, the exit status is 0 if selected lines are found and 1<br />
otherwise. But the exit status is 2 if an error occurred, unless the<br />
-q or --quiet or --silent option is used and a selected line is found.<br />
Note, however, that POSIX only mandates, for programs such as grep,<br />
cmp, and diff, that the exit status in case of error be greater than 1;<br />
it is therefore advisable, for the sake of portability, to use logic<br />
that tests for this general condition instead of strict equality<br />
with 2.<br />
<br />
COPYRIGHT<br />
Copyright © 1998, 1999, 2000, 2002, 2005 Free Software Foundation, Inc.<br />
<br />
This is free software; see the source for copying conditions. There is<br />
NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR<br />
PURPOSE.<br />
<br />
BUGS<br />
Reporting Bugs<br />
Email bug reports to <bug-grep@gnu.org>, a mailing list whose web page<br />
is <http: bug-grep="" listinfo="" lists.gnu.org="" mailman="">. grep's Savannah<br />
bug tracker is located at <http: ?group="grep" bugs="" savannah.gnu.org="">.<br />
<br />
Known Bugs<br />
Large repetition counts in the {n,m} construct may cause grep to use<br />
lots of memory. In addition, certain other obscure regular expressions<br />
require exponential time and space, and may cause grep to run out of<br />
memory.<br />
<br />
Back-references are very slow, and may require exponential time.<br />
<br />
SEE ALSO<br />
Regular Manual Pages<br />
awk(1), cmp(1), diff(1), find(1), gzip(1), perl(1), sed(1), sort(1),<br />
xargs(1), zgrep(1), mmap(2), read(2), pcre(3), pcrepattern(3),<br />
terminfo(5), glob(7), regex(7).<br />
<br />
POSIX Programmer's Manual Page<br />
grep(1p).<br />
<br />
TeXinfo Documentation<br />
The full documentation for grep is maintained as a TeXinfo manual. If<br />
the info and grep programs are properly installed at your site, the<br />
command<br />
<br />
info grep<br />
<br />
should give you access to the complete manual.<br />
<br />
NOTES<br />
GNU's not Unix, but Unix is a beast; its plural form is Unixen.<br />
<br />
<br />
<br />
GNU grep 2.5.1-cvs 2008-02-07 GREP(1)</http:></http:></bug-grep@gnu.org><br />
<bug-grep@gnu.org><http: bug-grep="" listinfo="" lists.gnu.org="" mailman=""><http: ?group="grep" bugs="" savannah.gnu.org=""><br />
</http:></http:></bug-grep@gnu.org><br />
<br />
<a href="http://techtabs.blogspot.com/p/linux.html">Back to linux LPIC1 Exam Objectives</a><bug-grep@gnu.org><http: bug-grep="" listinfo="" lists.gnu.org="" mailman=""><http: ?group="grep" bugs="" savannah.gnu.org=""> </http:></http:></bug-grep@gnu.org>Justinhttp://www.blogger.com/profile/10774510706045215599noreply@blogger.com0tag:blogger.com,1999:blog-28539953.post-6502415016231568662010-07-19T22:53:00.002+10:002010-07-19T22:58:08.946+10:00Man Page of ldd<h2>NAME</h2><br />
ldd - print shared library dependencies<br />
<h2>SYNOPSIS</h2>ldd [OPTION]... FILE...<br />
<h2>DESCRIPTION</h2>ldd prints the shared libraries required by each program or shared<br />
library specified on the command line.<br />
<h2>OPTIONS</h2>--version<br />
Print the version number of ldd.<br />
<br />
-v --verbose<br />
Print all information, including e.g. symbol versioning informa-<br />
tion.<br />
<br />
-d --data-relocs<br />
Perform relocations and report any missing objects (ELF only).<br />
<br />
-r --function-relocs<br />
Perform relocations for both data objects and functions, and<br />
report any missing objects or functions (ELF only).<br />
<br />
--help Usage information.<br />
<h2>BUGS</h2>ldd does not work on a.out shared libraries.<br />
<br />
ldd does not work with some extremely old a.out programs which were<br />
built before ldd support was added to the compiler releases. If you<br />
use ldd on one of these programs, the program will attempt to run with<br />
argc = 0 and the results will be unpredictable.<br />
<h2>AUTHOR</h2>Roland McGrath and Ulrich Drepper.<br />
<h2>SEE ALSO</h2><a href="http://unixhelp.ed.ac.uk/CGI/man-cgi?ldconfig+8">ldconfig(8)</a>, <a href="http://unixhelp.ed.ac.uk/CGI/man-cgi?ld.so+8">ld.so(8)</a>.<br />
<br />
30 October 2000 LDD(1)Justinhttp://www.blogger.com/profile/10774510706045215599noreply@blogger.com0tag:blogger.com,1999:blog-28539953.post-68498842315532238782010-07-19T21:45:00.004+10:002010-07-19T23:49:08.993+10:00/proc Folder UsageIdentify the I/O address range being used by device<br />
<b>cat /proc/ioports</b><br />
List which registered ISA DMA channels is in use<br />
<b>cat /proc/dma</b><br />
Display the current RAM useage<br />
<b>cat /proc/meminfo</b><br />
List the various character and block devices currently configured (not including devices whose modules are not loaded). <br />
<b>cat /proc/devices</b> <br />
Identify the model information of cpu which used in the system<br />
<b>cat /proc/cpuinfo</b><br />
Identify the parameters which passed to the kernel at boot time.<br />
<b>cat /proc/cmdline</b><br />
List all currently loaded kernel modules<br />
<b>cat /proc/modules</b> or <b>/sbin/lsmod</b> (more user friendly)<br />
List IRQ usage of kernel drivers <br />
<b>cat /proc/interrupts</b> <br />
<br />
<br />
<a href="http://techtabs.blogspot.com/p/linux.html">Back to linux LPIC1 Exam Objectives</a>Justinhttp://www.blogger.com/profile/10774510706045215599noreply@blogger.com0tag:blogger.com,1999:blog-28539953.post-7523519329288432162010-07-12T12:46:00.002+10:002010-07-12T12:46:36.988+10:00man page of dpkg-reconfigureNAME<br />
dpkg-reconfigure - reconfigure an already installed package<br />
<br />
SYNOPSIS<br />
dpkg-reconfigure [options] packages<br />
<br />
DESCRIPTION<br />
dpkg-reconfigure reconfigures packages after they have already been<br />
installed. Pass it the names of a package or packages to reconfigure.<br />
It will ask configuration questions, much like when the package was<br />
first installed.<br />
<br />
If you just want to see the current configuration of a package, see<br />
debconf-show(1) instead.<br />
<br />
OPTIONS<br />
-ftype, --frontend=type<br />
Select the frontend to use. The default frontend can be permanently<br />
changed by:<br />
<br />
dpkg-reconfigure debconf<br />
<br />
Note that if you normally have debconf set to use the<br />
noninteractive frontend, dpkg-reconfigure will use the dialog<br />
frontend instead, so you actually get to reconfigure the package.<br />
<br />
-pvalue, --priority=value<br />
Specify the minimum priority of question that will be displayed.<br />
dpkg-reconfigure normally shows low priority questions no matter<br />
what your default priority is. See debconf(7) for a list.<br />
<br />
--default-priority<br />
Use whatever the default priority of question is, instead of<br />
forcing the priority to low.<br />
<br />
-a, --all<br />
Reconfigure all installed packages that use debconf. Warning: this<br />
may take a long time.<br />
<br />
-u, --unseen-only<br />
By default, all questions are shown, even if they have already been<br />
answered. If this parameter is set though, only questions that have<br />
not yet been seen will be asked.<br />
<br />
--force<br />
Force dpkg-reconfigure to reconfigure a package even if the package<br />
is in an inconsistent or broken state. Use with caution.<br />
<br />
--no-reload<br />
Prevent dpkg-reconfigure from reloading templates. Use with<br />
caution; this will prevent dpkg-reconfigure from repairing broken<br />
templates databases. However, it may be useful in constrained<br />
environments where rewriting the templates database is expensive.<br />
<br />
-h, --help<br />
Display usage help.<br />
<br />
SEE ALSO<br />
debconf(7)<br />
<br />
AUTHOR<br />
Joey Hess <joeyh@debian.org><br />
<br />
<br />
<br />
2009-11-10 DPKG-RECONFIGURE(8)<br />
</joeyh@debian.org>Justinhttp://www.blogger.com/profile/10774510706045215599noreply@blogger.com0tag:blogger.com,1999:blog-28539953.post-41347105406190585252010-07-12T12:45:00.002+10:002010-07-12T12:45:44.829+10:00man page of apt-getNAME<br />
apt-get - APT package handling utility -- command-line interface<br />
<br />
SYNOPSIS<br />
apt-get [-sqdyfmubV] [-o= config_string ] [-c= config_file ]<br />
[-t= { target_release_name | target_release_number_expression | target_release_codename }]<br />
{update | upgrade | dselect-upgrade | dist-upgrade |<br />
install pkg [ { =pkg_version_number | /target_release_name | /target_release_codename } ] ...<br />
| remove pkg... | purge pkg... |<br />
source pkg [ { =pkg_version_number | /target_release_name | /target_release_codename } ] ...<br />
| build-dep pkg... | check | clean | autoclean | autoremove |<br />
{-v | --version} | {-h | --help}}<br />
<br />
DESCRIPTION<br />
apt-get is the command-line tool for handling packages, and may be<br />
considered the user's "back-end" to other tools using the APT library.<br />
Several "front-end" interfaces exist, such as dselect(1), aptitude(8),<br />
synaptic(8), gnome-apt(1) and wajig(1).<br />
<br />
Unless the -h, or --help option is given, one of the commands below<br />
must be present.<br />
<br />
update<br />
update is used to resynchronize the package index files from their<br />
sources. The indexes of available packages are fetched from the<br />
location(s) specified in /etc/apt/sources.list. For example, when<br />
using a Debian archive, this command retrieves and scans the<br />
Packages.gz files, so that information about new and updated<br />
packages is available. An update should always be performed before<br />
an upgrade or dist-upgrade. Please be aware that the overall<br />
progress meter will be incorrect as the size of the package files<br />
cannot be known in advance.<br />
<br />
upgrade<br />
upgrade is used to install the newest versions of all packages<br />
currently installed on the system from the sources enumerated in<br />
/etc/apt/sources.list. Packages currently installed with new<br />
versions available are retrieved and upgraded; under no<br />
circumstances are currently installed packages removed, or packages<br />
not already installed retrieved and installed. New versions of<br />
currently installed packages that cannot be upgraded without<br />
changing the install status of another package will be left at<br />
their current version. An update must be performed first so that<br />
apt-get knows that new versions of packages are available.<br />
<br />
dselect-upgrade<br />
dselect-upgrade is used in conjunction with the traditional Debian<br />
packaging front-end, dselect(1). dselect-upgrade follows the<br />
changes made by dselect(1) to the Status field of available<br />
packages, and performs the actions necessary to realize that state<br />
(for instance, the removal of old and the installation of new<br />
packages).<br />
<br />
dist-upgrade<br />
dist-upgrade in addition to performing the function of upgrade,<br />
also intelligently handles changing dependencies with new versions<br />
of packages; apt-get has a "smart" conflict resolution system, and<br />
it will attempt to upgrade the most important packages at the<br />
expense of less important ones if necessary. So, dist-upgrade<br />
command may remove some packages. The /etc/apt/sources.list file<br />
contains a list of locations from which to retrieve desired package<br />
files. See also apt_preferences(5) for a mechanism for overriding<br />
the general settings for individual packages.<br />
<br />
install<br />
install is followed by one or more packages desired for<br />
installation or upgrading. Each package is a package name, not a<br />
fully qualified filename (for instance, in a Debian GNU/Linux<br />
system, libc6 would be the argument provided, not<br />
libc6_1.9.6-2.deb). All packages required by the package(s)<br />
specified for installation will also be retrieved and installed.<br />
The /etc/apt/sources.list file is used to locate the desired<br />
packages. If a hyphen is appended to the package name (with no<br />
intervening space), the identified package will be removed if it is<br />
installed. Similarly a plus sign can be used to designate a package<br />
to install. These latter features may be used to override decisions<br />
made by apt-get's conflict resolution system.<br />
<br />
A specific version of a package can be selected for installation by<br />
following the package name with an equals and the version of the<br />
package to select. This will cause that version to be located and<br />
selected for install. Alternatively a specific distribution can be<br />
selected by following the package name with a slash and the version<br />
of the distribution or the Archive name (stable, testing,<br />
unstable).<br />
<br />
Both of the version selection mechanisms can downgrade packages and<br />
must be used with care.<br />
<br />
This is also the target to use if you want to upgrade one or more<br />
already-installed packages without upgrading every package you have<br />
on your system. Unlike the "upgrade" target, which installs the<br />
newest version of all currently installed packages, "install" will<br />
install the newest version of only the package(s) specified. Simply<br />
provide the name of the package(s) you wish to upgrade, and if a<br />
newer version is available, it (and its dependencies, as described<br />
above) will be downloaded and installed.<br />
<br />
Finally, the apt_preferences(5) mechanism allows you to create an<br />
alternative installation policy for individual packages.<br />
<br />
If no package matches the given expression and the expression<br />
contains one of '.', '?' or '*' then it is assumed to be a POSIX<br />
regular expression, and it is applied to all package names in the<br />
database. Any matches are then installed (or removed). Note that<br />
matching is done by substring so 'lo.*' matches 'how-lo' and<br />
'lowest'. If this is undesired, anchor the regular expression with<br />
a '^' or '$' character, or create a more specific regular<br />
expression.<br />
<br />
remove<br />
remove is identical to install except that packages are removed<br />
instead of installed. Note the removing a package leaves its<br />
configuration files in system. If a plus sign is appended to the<br />
package name (with no intervening space), the identified package<br />
will be installed instead of removed.<br />
<br />
purge<br />
purge is identical to remove except that packages are removed and<br />
purged (any configuration files are deleted too).<br />
<br />
source<br />
source causes apt-get to fetch source packages. APT will examine<br />
the available packages to decide which source package to fetch. It<br />
will then find and download into the current directory the newest<br />
available version of that source package while respect the default<br />
release, set with the option APT::Default-Release, the -t option or<br />
per package with the pkg/release syntax, if possible.<br />
<br />
Source packages are tracked separately from binary packages via<br />
deb-src type lines in the sources.list(5) file. This means that you<br />
will need to add such a line for each repository you want to get<br />
sources from. If you don't do this you will properly get another<br />
(newer, older or none) source version than the one you have<br />
installed or could install.<br />
<br />
If the --compile option is specified then the package will be<br />
compiled to a binary .deb using dpkg-buildpackage, if<br />
--download-only is specified then the source package will not be<br />
unpacked.<br />
<br />
A specific source version can be retrieved by postfixing the source<br />
name with an equals and then the version to fetch, similar to the<br />
mechanism used for the package files. This enables exact matching<br />
of the source package name and version, implicitly enabling the<br />
APT::Get::Only-Source option.<br />
<br />
Note that source packages are not tracked like binary packages,<br />
they exist only in the current directory and are similar to<br />
downloading source tar balls.<br />
<br />
build-dep<br />
build-dep causes apt-get to install/remove packages in an attempt<br />
to satisfy the build dependencies for a source package.<br />
<br />
check<br />
check is a diagnostic tool; it updates the package cache and checks<br />
for broken dependencies.<br />
<br />
clean<br />
clean clears out the local repository of retrieved package files.<br />
It removes everything but the lock file from<br />
/var/cache/apt/archives/ and /var/cache/apt/archives/partial/. When<br />
APT is used as a dselect(1) method, clean is run automatically.<br />
Those who do not use dselect will likely want to run apt-get clean<br />
from time to time to free up disk space.<br />
<br />
autoclean<br />
Like clean, autoclean clears out the local repository of retrieved<br />
package files. The difference is that it only removes package files<br />
that can no longer be downloaded, and are largely useless. This<br />
allows a cache to be maintained over a long period without it<br />
growing out of control. The configuration option<br />
APT::Clean-Installed will prevent installed packages from being<br />
erased if it is set to off.<br />
<br />
autoremove<br />
autoremove is used to remove packages that were automatically<br />
installed to satisfy dependencies for some package and that are no<br />
more needed.<br />
<br />
OPTIONS<br />
All command line options may be set using the configuration file, the<br />
descriptions indicate the configuration option to set. For boolean<br />
options you can override the config file by using something like<br />
-f-,--no-f, -f=no or several other variations.<br />
<br />
--no-install-recommends<br />
Do not consider recommended packages as a dependency for<br />
installing. Configuration Item: APT::Install-Recommends.<br />
<br />
-d, --download-only<br />
Download only; package files are only retrieved, not unpacked or<br />
installed. Configuration Item: APT::Get::Download-Only.<br />
<br />
-f, --fix-broken<br />
Fix; attempt to correct a system with broken dependencies in place.<br />
This option, when used with install/remove, can omit any packages<br />
to permit APT to deduce a likely solution. If packages are<br />
specified, these have to completely correct the problem. The option<br />
is sometimes necessary when running APT for the first time; APT<br />
itself does not allow broken package dependencies to exist on a<br />
system. It is possible that a system's dependency structure can be<br />
so corrupt as to require manual intervention (which usually means<br />
using dselect(1) or dpkg --remove to eliminate some of the<br />
offending packages). Use of this option together with -m may<br />
produce an error in some situations. Configuration Item:<br />
APT::Get::Fix-Broken.<br />
<br />
-m, --ignore-missing, --fix-missing<br />
Ignore missing packages; If packages cannot be retrieved or fail<br />
the integrity check after retrieval (corrupted package files), hold<br />
back those packages and handle the result. Use of this option<br />
together with -f may produce an error in some situations. If a<br />
package is selected for installation (particularly if it is<br />
mentioned on the command line) and it could not be downloaded then<br />
it will be silently held back. Configuration Item:<br />
APT::Get::Fix-Missing.<br />
<br />
--no-download<br />
Disables downloading of packages. This is best used with<br />
--ignore-missing to force APT to use only the .debs it has already<br />
downloaded. Configuration Item: APT::Get::Download.<br />
<br />
-q, --quiet<br />
Quiet; produces output suitable for logging, omitting progress<br />
indicators. More q's will produce more quiet up to a maximum of 2.<br />
You can also use -q=# to set the quiet level, overriding the<br />
configuration file. Note that quiet level 2 implies -y, you should<br />
never use -qq without a no-action modifier such as -d, --print-uris<br />
or -s as APT may decided to do something you did not expect.<br />
Configuration Item: quiet.<br />
<br />
-s, --simulate, --just-print, --dry-run, --recon, --no-act<br />
No action; perform a simulation of events that would occur but do<br />
not actually change the system. Configuration Item:<br />
APT::Get::Simulate.<br />
<br />
Simulation run as user will deactivate locking (Debug::NoLocking)<br />
automatic. Also a notice will be displayed indicating that this is<br />
only a simulation, if the option<br />
APT::Get::Show-User-Simulation-Note is set (Default: true). Neither<br />
NoLocking nor the notice will be triggered if run as root (root<br />
should know what he is doing without further warnings by apt-get).<br />
<br />
Simulate prints out a series of lines each one representing a dpkg<br />
operation, Configure (Conf), Remove (Remv), Unpack (Inst). Square<br />
brackets indicate broken packages and empty set of square brackets<br />
meaning breaks that are of no consequence (rare).<br />
<br />
-y, --yes, --assume-yes<br />
Automatic yes to prompts; assume "yes" as answer to all prompts and<br />
run non-interactively. If an undesirable situation, such as<br />
changing a held package, trying to install a unauthenticated<br />
package or removing an essential package occurs then apt-get will<br />
abort. Configuration Item: APT::Get::Assume-Yes.<br />
<br />
-u, --show-upgraded<br />
Show upgraded packages; Print out a list of all packages that are<br />
to be upgraded. Configuration Item: APT::Get::Show-Upgraded.<br />
<br />
-V, --verbose-versions<br />
Show full versions for upgraded and installed packages.<br />
Configuration Item: APT::Get::Show-Versions.<br />
<br />
-b, --compile, --build<br />
Compile source packages after downloading them. Configuration Item:<br />
APT::Get::Compile.<br />
<br />
--install-recommends<br />
Also install recommended packages.<br />
<br />
--no-install-recommends<br />
Do not install recommended packages.<br />
<br />
--ignore-hold<br />
Ignore package Holds; This causes apt-get to ignore a hold placed<br />
on a package. This may be useful in conjunction with dist-upgrade<br />
to override a large number of undesired holds. Configuration Item:<br />
APT::Ignore-Hold.<br />
<br />
--no-upgrade<br />
Do not upgrade packages; When used in conjunction with install,<br />
no-upgrade will prevent packages on the command line from being<br />
upgraded if they are already installed. Configuration Item:<br />
APT::Get::Upgrade.<br />
<br />
--force-yes<br />
Force yes; This is a dangerous option that will cause apt to<br />
continue without prompting if it is doing something potentially<br />
harmful. It should not be used except in very special situations.<br />
Using force-yes can potentially destroy your system! Configuration<br />
Item: APT::Get::force-yes.<br />
<br />
--print-uris<br />
Instead of fetching the files to install their URIs are printed.<br />
Each URI will have the path, the destination file name, the size<br />
and the expected md5 hash. Note that the file name to write to will<br />
not always match the file name on the remote site! This also works<br />
with the source and update commands. When used with the update<br />
command the MD5 and size are not included, and it is up to the user<br />
to decompress any compressed files. Configuration Item:<br />
APT::Get::Print-URIs.<br />
<br />
--purge<br />
Use purge instead of remove for anything that would be removed. An<br />
asterisk ("*") will be displayed next to packages which are<br />
scheduled to be purged. remove --purge is equivalent to the purge<br />
command. Configuration Item: APT::Get::Purge.<br />
<br />
--reinstall<br />
Re-Install packages that are already installed and at the newest<br />
version. Configuration Item: APT::Get::ReInstall.<br />
<br />
--list-cleanup<br />
This option defaults to on, use --no-list-cleanup to turn it off.<br />
When on apt-get will automatically manage the contents of<br />
/var/lib/apt/lists to ensure that obsolete files are erased. The<br />
only reason to turn it off is if you frequently change your source<br />
list. Configuration Item: APT::Get::List-Cleanup.<br />
<br />
-t, --target-release, --default-release<br />
This option controls the default input to the policy engine, it<br />
creates a default pin at priority 990 using the specified release<br />
string. This overrides the general settings in<br />
/etc/apt/preferences. Specifically pinned packages are not affected<br />
by the value of this option. In short, this option lets you have<br />
simple control over which distribution packages will be retrieved<br />
from. Some common examples might be -t '2.1*', -t unstable or -t<br />
sid. Configuration Item: APT::Default-Release; see also the<br />
apt_preferences(5) manual page.<br />
<br />
--trivial-only<br />
Only perform operations that are 'trivial'. Logically this can be<br />
considered related to --assume-yes, where --assume-yes will answer<br />
yes to any prompt, --trivial-only will answer no. Configuration<br />
Item: APT::Get::Trivial-Only.<br />
<br />
--no-remove<br />
If any packages are to be removed apt-get immediately aborts<br />
without prompting. Configuration Item: APT::Get::Remove.<br />
<br />
--auto-remove<br />
If the command is either install or remove, then this option acts<br />
like running autoremove command, removing the unused dependency<br />
packages. Configuration Item: APT::Get::AutomaticRemove.<br />
<br />
--only-source<br />
Only has meaning for the source and build-dep commands. Indicates<br />
that the given source names are not to be mapped through the binary<br />
table. This means that if this option is specified, these commands<br />
will only accept source package names as arguments, rather than<br />
accepting binary package names and looking up the corresponding<br />
source package. Configuration Item: APT::Get::Only-Source.<br />
<br />
--diff-only, --dsc-only, --tar-only<br />
Download only the diff, dsc, or tar file of a source archive.<br />
Configuration Item: APT::Get::Diff-Only, APT::Get::Dsc-Only, and<br />
APT::Get::Tar-Only.<br />
<br />
--arch-only<br />
Only process architecture-dependent build-dependencies.<br />
Configuration Item: APT::Get::Arch-Only.<br />
<br />
--allow-unauthenticated<br />
Ignore if packages can't be authenticated and don't prompt about<br />
it. This is useful for tools like pbuilder. Configuration Item:<br />
APT::Get::AllowUnauthenticated.<br />
<br />
-h, --help<br />
Show a short usage summary.<br />
<br />
-v, --version<br />
Show the program version.<br />
<br />
-c, --config-file<br />
Configuration File; Specify a configuration file to use. The<br />
program will read the default configuration file and then this<br />
configuration file. See apt.conf(5) for syntax information.<br />
<br />
-o, --option<br />
Set a Configuration Option; This will set an arbitrary<br />
configuration option. The syntax is -o Foo::Bar=bar. -o and<br />
--option can be used multiple times to set different options.<br />
<br />
FILES<br />
/etc/apt/sources.list<br />
Locations to fetch packages from. Configuration Item:<br />
Dir::Etc::SourceList.<br />
<br />
/etc/apt/sources.list.d/<br />
File fragments for locations to fetch packages from. Configuration<br />
Item: Dir::Etc::SourceParts.<br />
<br />
/etc/apt/apt.conf<br />
APT configuration file. Configuration Item: Dir::Etc::Main.<br />
<br />
/etc/apt/apt.conf.d/<br />
APT configuration file fragments. Configuration Item:<br />
Dir::Etc::Parts.<br />
<br />
/etc/apt/preferences<br />
Version preferences file. This is where you would specify<br />
"pinning", i.e. a preference to get certain packages from a<br />
separate source or from a different version of a distribution.<br />
Configuration Item: Dir::Etc::Preferences.<br />
<br />
/etc/apt/preferences.d/<br />
File fragments for the version preferences. Configuration Item:<br />
Dir::Etc::PreferencesParts.<br />
<br />
/var/cache/apt/archives/<br />
Storage area for retrieved package files. Configuration Item:<br />
Dir::Cache::Archives.<br />
<br />
/var/cache/apt/archives/partial/<br />
Storage area for package files in transit. Configuration Item:<br />
Dir::Cache::Archives (implicit partial).<br />
<br />
/var/lib/apt/lists/<br />
Storage area for state information for each package resource<br />
specified in sources.list(5) Configuration Item: Dir::State::Lists.<br />
<br />
/var/lib/apt/lists/partial/<br />
Storage area for state information in transit. Configuration Item:<br />
Dir::State::Lists (implicit partial).<br />
<br />
SEE ALSO<br />
apt-cache(8), apt-cdrom(8), dpkg(1), dselect(1), sources.list(5),<br />
apt.conf(5), apt-config(8), apt-secure(8), The APT User's guide in<br />
/usr/share/doc/apt-doc/, apt_preferences(5), the APT Howto.<br />
<br />
DIAGNOSTICS<br />
apt-get returns zero on normal operation, decimal 100 on error.<br />
<br />
ORIGINAL AUTHORS<br />
Jason Gunthorpe<br />
<br />
CURRENT AUTHORS<br />
APT team<br />
<br />
QA Page[1]<br />
<br />
BUGS<br />
APT bug page[2]. If you wish to report a bug in APT, please see<br />
/usr/share/doc/debian/bug-reporting.txt or the reportbug(1) command.<br />
<br />
AUTHORS<br />
Jason Gunthorpe<br />
<br />
APT team<br />
<br />
NOTES<br />
1. QA Page<br />
http://packages.qa.debian.org/a/apt.html<br />
<br />
2. APT bug page<br />
http://bugs.debian.org/src:apt<br />
<br />
<br />
<br />
Linux 08 November 2008 APT-GET(8)Justinhttp://www.blogger.com/profile/10774510706045215599noreply@blogger.com0tag:blogger.com,1999:blog-28539953.post-41561953465097201542010-07-12T12:44:00.002+10:002010-07-12T12:44:54.361+10:00man page of apt-cacheNAME<br />
apt-cache - APT package handling utility -- cache manipulator<br />
<br />
SYNOPSIS<br />
apt-cache [-hvsn] [-o=config string] [-c=file] {[add file...] |<br />
[gencaches] | [showpkg pkg...] | [showsrc pkg...] | [stats] |<br />
[dump] | [dumpavail] | [unmet] | [search regex] |<br />
[show pkg...] | [depends pkg...] | [rdepends pkg...] |<br />
[pkgnames prefix] | [dotty pkg...] | [xvcg pkg...] |<br />
[policy pkgs...] | [madison pkgs...]}<br />
<br />
DESCRIPTION<br />
apt-cache performs a variety of operations on APT's package cache.<br />
apt-cache does not manipulate the state of the system but does provide<br />
operations to search and generate interesting output from the package<br />
metadata.<br />
<br />
Unless the -h, or --help option is given, one of the commands below<br />
must be present.<br />
<br />
add file(s)<br />
add adds the named package index files to the package cache. This<br />
is for debugging only.<br />
<br />
gencaches<br />
gencaches performs the same operation as apt-get check. It builds<br />
the source and package caches from the sources in sources.list(5)<br />
and from /var/lib/dpkg/status.<br />
<br />
showpkg pkg(s)<br />
showpkg displays information about the packages listed on the<br />
command line. Remaining arguments are package names. The available<br />
versions and reverse dependencies of each package listed are<br />
listed, as well as forward dependencies for each version. Forward<br />
(normal) dependencies are those packages upon which the package in<br />
question depends; reverse dependencies are those packages that<br />
depend upon the package in question. Thus, forward dependencies<br />
must be satisfied for a package, but reverse dependencies need not<br />
be. For instance, apt-cache showpkg libreadline2 would produce<br />
output similar to the following:<br />
<br />
Package: libreadline2<br />
Versions: 2.1-12(/var/state/apt/lists/foo_Packages),<br />
Reverse Depends:<br />
libreadlineg2,libreadline2<br />
libreadline2-altdev,libreadline2<br />
Dependencies:<br />
2.1-12 - libc5 (2 5.4.0-0) ncurses3.0 (0 (null))<br />
Provides:<br />
2.1-12 -<br />
Reverse Provides:<br />
Thus it may be seen that libreadline2, version 2.1-12, depends on<br />
libc5 and ncurses3.0 which must be installed for libreadline2 to<br />
work. In turn, libreadlineg2 and libreadline2-altdev depend on<br />
libreadline2. If libreadline2 is installed, libc5 and ncurses3.0<br />
(and ldso) must also be installed; libreadlineg2 and<br />
libreadline2-altdev do not have to be installed. For the specific<br />
meaning of the remainder of the output it is best to consult the<br />
apt source code.<br />
<br />
stats<br />
stats displays some statistics about the cache. No further<br />
arguments are expected. Statistics reported are:<br />
<br />
· Total package names is the number of package names found in the<br />
cache.<br />
<br />
· Normal packages is the number of regular, ordinary package<br />
names; these are packages that bear a one-to-one correspondence<br />
between their names and the names used by other packages for<br />
them in dependencies. The majority of packages fall into this<br />
category.<br />
<br />
· Pure virtual packages is the number of packages that exist only<br />
as a virtual package name; that is, packages only "provide" the<br />
virtual package name, and no package actually uses the name.<br />
For instance, "mail-transport-agent" in the Debian GNU/Linux<br />
system is a pure virtual package; several packages provide<br />
"mail-transport-agent", but there is no package named<br />
"mail-transport-agent".<br />
<br />
· Single virtual packages is the number of packages with only one<br />
package providing a particular virtual package. For example, in<br />
the Debian GNU/Linux system, "X11-text-viewer" is a virtual<br />
package, but only one package, xless, provides<br />
"X11-text-viewer".<br />
<br />
· Mixed virtual packages is the number of packages that either<br />
provide a particular virtual package or have the virtual<br />
package name as the package name. For instance, in the Debian<br />
GNU/Linux system, "debconf" is both an actual package, and<br />
provided by the debconf-tiny package.<br />
<br />
· Missing is the number of package names that were referenced in<br />
a dependency but were not provided by any package. Missing<br />
packages may be an evidence if a full distribution is not<br />
accessed, or if a package (real or virtual) has been dropped<br />
from the distribution. Usually they are referenced from<br />
Conflicts or Breaks statements.<br />
<br />
· Total distinct versions is the number of package versions found<br />
in the cache; this value is therefore at least equal to the<br />
number of total package names. If more than one distribution<br />
(both "stable" and "unstable", for instance), is being<br />
accessed, this value can be considerably larger than the number<br />
of total package names.<br />
<br />
· Total dependencies is the number of dependency relationships<br />
claimed by all of the packages in the cache.<br />
<br />
<br />
showsrc pkg(s)<br />
showsrc displays all the source package records that match the<br />
given package names. All versions are shown, as well as all records<br />
that declare the name to be a Binary.<br />
<br />
dump<br />
dump shows a short listing of every package in the cache. It is<br />
primarily for debugging.<br />
<br />
dumpavail<br />
dumpavail prints out an available list to stdout. This is suitable<br />
for use with dpkg(1) and is used by the dselect(1) method.<br />
<br />
unmet<br />
unmet displays a summary of all unmet dependencies in the package<br />
cache.<br />
<br />
show pkg(s)<br />
show performs a function similar to dpkg --print-avail; it displays<br />
the package records for the named packages.<br />
<br />
search regex [ regex ... ]<br />
search performs a full text search on all available package lists<br />
for the POSIX regex pattern given, see regex(7). It searches the<br />
package names and the descriptions for an occurrence of the regular<br />
expression and prints out the package name and the short<br />
description, including virtual package names. If --full is given<br />
then output identical to show is produced for each matched package,<br />
and if --names-only is given then the long description is not<br />
searched, only the package name is.<br />
<br />
Separate arguments can be used to specify multiple search patterns<br />
that are and'ed together.<br />
<br />
depends pkg(s)<br />
depends shows a listing of each dependency a package has and all<br />
the possible other packages that can fulfill that dependency.<br />
<br />
rdepends pkg(s)<br />
rdepends shows a listing of each reverse dependency a package has.<br />
<br />
pkgnames [ prefix ]<br />
This command prints the name of each package APT knows. The<br />
optional argument is a prefix match to filter the name list. The<br />
output is suitable for use in a shell tab complete function and the<br />
output is generated extremely quickly. This command is best used<br />
with the --generate option.<br />
<br />
Note that a package which APT knows of is not necessarily available<br />
to download, installable or installed, e.g. virtual packages are<br />
also listed in the generated list.<br />
<br />
dotty pkg(s)<br />
dotty takes a list of packages on the command line and generates<br />
output suitable for use by dotty from the GraphViz[1] package. The<br />
result will be a set of nodes and edges representing the<br />
relationships between the packages. By default the given packages<br />
will trace out all dependent packages; this can produce a very<br />
large graph. To limit the output to only the packages listed on the<br />
command line, set the APT::Cache::GivenOnly option.<br />
<br />
The resulting nodes will have several shapes; normal packages are<br />
boxes, pure provides are triangles, mixed provides are diamonds,<br />
missing packages are hexagons. Orange boxes mean recursion was<br />
stopped [leaf packages], blue lines are pre-depends, green lines<br />
are conflicts.<br />
<br />
Caution, dotty cannot graph larger sets of packages.<br />
<br />
xvcg pkg(s)<br />
The same as dotty, only for xvcg from the VCG tool[2].<br />
<br />
policy [ pkg(s) ]<br />
policy is meant to help debug issues relating to the preferences<br />
file. With no arguments it will print out the priorities of each<br />
source. Otherwise it prints out detailed information about the<br />
priority selection of the named package.<br />
<br />
madison /[ pkg(s) ]<br />
apt-cache's madison command attempts to mimic the output format and<br />
a subset of the functionality of the Debian archive management<br />
tool, madison. It displays available versions of a package in a<br />
tabular format. Unlike the original madison, it can only display<br />
information for the architecture for which APT has retrieved<br />
package lists (APT::Architecture).<br />
<br />
OPTIONS<br />
All command line options may be set using the configuration file, the<br />
descriptions indicate the configuration option to set. For boolean<br />
options you can override the config file by using something like<br />
-f-,--no-f, -f=no or several other variations.<br />
<br />
-p, --pkg-cache<br />
Select the file to store the package cache. The package cache is<br />
the primary cache used by all operations. Configuration Item:<br />
Dir::Cache::pkgcache.<br />
<br />
-s, --src-cache<br />
Select the file to store the source cache. The source is used only<br />
by gencaches and it stores a parsed version of the package<br />
information from remote sources. When building the package cache<br />
the source cache is used to avoid reparsing all of the package<br />
files. Configuration Item: Dir::Cache::srcpkgcache.<br />
<br />
-q, --quiet<br />
Quiet; produces output suitable for logging, omitting progress<br />
indicators. More q's will produce more quietness up to a maximum of<br />
2. You can also use -q=# to set the quietness level, overriding the<br />
configuration file. Configuration Item: quiet.<br />
<br />
-i, --important<br />
Print only important dependencies; for use with unmet and depends.<br />
Causes only Depends and Pre-Depends relations to be printed.<br />
Configuration Item: APT::Cache::Important.<br />
<br />
-f, --full<br />
Print full package records when searching. Configuration Item:<br />
APT::Cache::ShowFull.<br />
<br />
-a, --all-versions<br />
Print full records for all available versions. This is the default;<br />
to turn it off, use --no-all-versions. If --no-all-versions is<br />
specified, only the candidate version will displayed (the one which<br />
would be selected for installation). This option is only applicable<br />
to the show command. Configuration Item: APT::Cache::AllVersions.<br />
<br />
-g, --generate<br />
Perform automatic package cache regeneration, rather than use the<br />
cache as it is. This is the default; to turn it off, use<br />
--no-generate. Configuration Item: APT::Cache::Generate.<br />
<br />
--names-only, -n<br />
Only search on the package names, not the long descriptions.<br />
Configuration Item: APT::Cache::NamesOnly.<br />
<br />
--all-names<br />
Make pkgnames print all names, including virtual packages and<br />
missing dependencies. Configuration Item: APT::Cache::AllNames.<br />
<br />
--recurse<br />
Make depends and rdepends recursive so that all packages mentioned<br />
are printed once. Configuration Item: APT::Cache::RecurseDepends.<br />
<br />
--installed<br />
Limit the output of depends and rdepends to packages which are<br />
currently installed. Configuration Item: APT::Cache::Installed.<br />
<br />
-h, --help<br />
Show a short usage summary.<br />
<br />
-v, --version<br />
Show the program version.<br />
<br />
-c, --config-file<br />
Configuration File; Specify a configuration file to use. The<br />
program will read the default configuration file and then this<br />
configuration file. See apt.conf(5) for syntax information.<br />
<br />
-o, --option<br />
Set a Configuration Option; This will set an arbitrary<br />
configuration option. The syntax is -o Foo::Bar=bar. -o and<br />
--option can be used multiple times to set different options.<br />
<br />
FILES<br />
/etc/apt/sources.list<br />
Locations to fetch packages from. Configuration Item:<br />
Dir::Etc::SourceList.<br />
<br />
/etc/apt/sources.list.d/<br />
File fragments for locations to fetch packages from. Configuration<br />
Item: Dir::Etc::SourceParts.<br />
<br />
/var/lib/apt/lists/<br />
Storage area for state information for each package resource<br />
specified in sources.list(5) Configuration Item: Dir::State::Lists.<br />
<br />
/var/lib/apt/lists/partial/<br />
Storage area for state information in transit. Configuration Item:<br />
Dir::State::Lists (implicit partial).<br />
<br />
SEE ALSO<br />
apt.conf(5), sources.list(5), apt-get(8)<br />
<br />
DIAGNOSTICS<br />
apt-cache returns zero on normal operation, decimal 100 on error.<br />
<br />
BUGS<br />
APT bug page[3]. If you wish to report a bug in APT, please see<br />
/usr/share/doc/debian/bug-reporting.txt or the reportbug(1) command.<br />
<br />
AUTHORS<br />
Jason Gunthorpe<br />
<br />
APT team<br />
<br />
NOTES<br />
1. GraphViz<br />
http://www.research.att.com/sw/tools/graphviz/<br />
<br />
2. VCG tool<br />
http://rw4.cs.uni-sb.de/users/sander/html/gsvcg1.html<br />
<br />
3. APT bug page<br />
http://bugs.debian.org/src:apt<br />
<br />
<br />
<br />
Linux 29 February 2004 APT-CACHE(8)Justinhttp://www.blogger.com/profile/10774510706045215599noreply@blogger.com0tag:blogger.com,1999:blog-28539953.post-18802276935045410202010-07-12T12:43:00.000+10:002010-07-12T12:43:44.584+10:00man page of dpkgNAME<br />
dpkg - package manager for Debian<br />
<br />
SYNOPSIS<br />
dpkg [options] action<br />
<br />
WARNING<br />
This manual is intended for users wishing to understand dpkg's command<br />
line options and package states in more detail than that provided by<br />
dpkg --help.<br />
<br />
It should not be used by package maintainers wishing to understand how<br />
dpkg will install their packages. The descriptions of what dpkg does<br />
when installing and removing packages are particularly inadequate.<br />
<br />
DESCRIPTION<br />
dpkg is a tool to install, build, remove and manage Debian packages.<br />
The primary and more user-friendly front-end for dpkg is aptitude(1).<br />
dpkg itself is controlled entirely via command line parameters, which<br />
consist of exactly one action and zero or more options. The action-<br />
parameter tells dpkg what to do and options control the behavior of the<br />
action in some way.<br />
<br />
dpkg can also be used as a front-end to dpkg-deb(1). The following are<br />
dpkg-deb actions, and if they are encountered, dpkg just runs dpkg-deb<br />
with the parameters given to it:<br />
-b, --build,<br />
-c, --contents,<br />
-I, --info,<br />
-f, --field,<br />
-e, --control,<br />
-x, --extract,<br />
-X, --vextract, and<br />
--fsys-tarfile.<br />
Please refer to dpkg-deb(1) for information about these actions.<br />
<br />
INFORMATION ABOUT PACKAGES<br />
dpkg maintains some usable information about available packages. The<br />
information is divided in three classes: states, selection states and<br />
flags. These values are intended to be changed mainly with dselect.<br />
<br />
PACKAGE STATES<br />
not-installed<br />
The package is not installed on your system.<br />
<br />
config-files<br />
Only the configuration files of the package exist on the system.<br />
<br />
half-installed<br />
The installation of the package has been started, but not com‐<br />
pleted for some reason.<br />
<br />
unpacked<br />
The package is unpacked, but not configured.<br />
<br />
half-configured<br />
The package is unpacked and configuration has been started, but<br />
not yet completed for some reason.<br />
<br />
triggers-awaited<br />
The package awaits trigger processing by another package.<br />
<br />
triggers-pending<br />
The package has been triggered.<br />
<br />
installed<br />
The package is unpacked and configured OK.<br />
<br />
PACKAGE SELECTION STATES<br />
install<br />
The package is selected for installation.<br />
<br />
hold A package marked to be on hold is not handled by dpkg, unless<br />
forced to do that with option --force-hold.<br />
<br />
deinstall<br />
The package is selected for deinstallation (i.e. we want to<br />
remove all files, except configuration files).<br />
<br />
purge The package is selected to be purged (i.e. we want to remove<br />
everything, even configuration files).<br />
<br />
PACKAGE FLAGS<br />
reinst-required<br />
A package marked reinst-required is broken and requires rein‐<br />
stallation. These packages cannot be removed, unless forced with<br />
option --force-remove-reinstreq.<br />
<br />
ACTIONS<br />
-i, --install package_file...<br />
Install the package. If --recursive or -R option is specified,<br />
package_file must refer to a directory instead.<br />
<br />
Installation consists of the following steps:<br />
<br />
1. Extract the control files of the new package.<br />
<br />
2. If another version of the same package was installed before<br />
the new installation, execute prerm script of the old package.<br />
<br />
3. Run preinst script, if provided by the package.<br />
<br />
4. Unpack the new files, and at the same time back up the old<br />
files, so that if something goes wrong, they can be restored.<br />
<br />
5. If another version of the same package was installed before<br />
the new installation, execute the postrm script of the old pack‐<br />
age. Note that this script is executed after the preinst script<br />
of the new package, because new files are written at the same<br />
time old files are removed.<br />
<br />
6. Configure the package. See --configure for detailed informa‐<br />
tion about how this is done.<br />
<br />
--unpack package_file...<br />
Unpack the package, but don't configure it. If --recursive or -R<br />
option is specified, package_file must refer to a directory<br />
instead.<br />
<br />
--configure package...|-a|--pending<br />
Reconfigure an unpacked package. If -a or --pending is given<br />
instead of package, all unpacked but unconfigured packages are<br />
configured.<br />
<br />
Configuring consists of the following steps:<br />
<br />
1. Unpack the conffiles, and at the same time back up the old<br />
conffiles, so that they can be restored if something goes wrong.<br />
<br />
2. Run postinst script, if provided by the package.<br />
<br />
--triggers-only package...|-a|--pending<br />
Processes only triggers. All pending triggers will be processed.<br />
If package names are supplied only those packages' triggers will<br />
be processed, exactly once each where necessary. Use of this<br />
option may leave packages in the improper triggers-awaited and<br />
triggers-pending states. This can be fixed later by running:<br />
dpkg --configure --pending.<br />
<br />
-r, --remove, -P, --purge package...|-a|--pending<br />
Remove an installed package. -r or --remove remove everything<br />
except conffiles. This may avoid having to reconfigure the pack‐<br />
age if it is reinstalled later. (Conffiles are configuration<br />
files that are listed in the DEBIAN/conffiles control file). -P<br />
or --purge removes everything, including conffiles. If -a or<br />
--pending is given instead of a package name, then all packages<br />
unpacked, but marked to be removed or purged in file<br />
/var/lib/dpkg/status, are removed or purged, respectively. Note:<br />
some configuration files might be unknown to dpkg because they<br />
are created and handled separately through the configuration<br />
scripts. In that case, dpkg won't remove them by itself, but the<br />
package's postrm script (which is called by dpkg), has to take<br />
care of their removal during purge.<br />
<br />
Removing of a package consists of the following steps:<br />
<br />
1. Run prerm script<br />
<br />
2. Remove the installed files<br />
<br />
3. Run postrm script<br />
<br />
--update-avail, --merge-avail Packages-file<br />
Update dpkg's and dselect's idea of which packages are avail‐<br />
able. With action --merge-avail, old information is combined<br />
with information from Packages-file. With action --update-avail,<br />
old information is replaced with the information in the Pack‐<br />
ages-file. The Packages-file distributed with Debian is simply<br />
named Packages. dpkg keeps its record of available packages in<br />
/var/lib/dpkg/available.<br />
<br />
A simpler one-shot command to retrieve and update the available<br />
file is dselect update. Note that this file is mostly useless if<br />
you don't use dselect but an APT-based frontend: APT has its own<br />
system to keep track of available packages.<br />
<br />
-A, --record-avail package_file...<br />
Update dpkg and dselect's idea of which packages are available<br />
with information from the package package_file. If --recursive<br />
or -R option is specified, package_file must refer to a direc‐<br />
tory instead.<br />
<br />
--forget-old-unavail<br />
Now obsolete and a no-op as dpkg will automatically forget unin‐<br />
stalled unavailable packages.<br />
<br />
--clear-avail<br />
Erase the existing information about what packages are avail‐<br />
able.<br />
<br />
-C, --audit<br />
Searches for packages that have been installed only partially on<br />
your system. dpkg will suggest what to do with them to get them<br />
working.<br />
<br />
--get-selections [package-name-pattern...]<br />
Get list of package selections, and write it to stdout. Without<br />
a pattern, non-installed packages (i.e. those which have been<br />
previously purged) will not be shown.<br />
<br />
--set-selections<br />
Set package selections using file read from stdin. This file<br />
should be in the format '<package> <state>', where state is one<br />
of install, hold, deinstall or purge. Blank lines and comment<br />
lines beginning with '#' are also permitted.<br />
<br />
--clear-selections<br />
Set the requested state of every non-essential package to dein‐<br />
stall. This is intended to be used immediately before<br />
--set-selections, to deinstall any packages not in list given to<br />
--set-selections.<br />
<br />
--yet-to-unpack<br />
Searches for packages selected for installation, but which for<br />
some reason still haven't been installed.<br />
<br />
<br />
--print-architecture<br />
Print architecture of packages dpkg installs (for exam‐<br />
ple, "i386").<br />
<br />
--compare-versions ver1 op ver2<br />
Compare version numbers, where op is a binary operator.<br />
dpkg returns success (zero result) if the specified con‐<br />
dition is satisfied, and failure (nonzero result) other‐<br />
wise. There are two groups of operators, which differ in<br />
how they treat an empty ver1 or ver2. These treat an<br />
empty version as earlier than any version: lt le eq ne ge<br />
gt. These treat an empty version as later than any ver‐<br />
sion: lt-nl le-nl ge-nl gt-nl. These are provided only<br />
for compatibility with control file syntax: < << <= = >=<br />
>> >.<br />
<br />
--command-fd <n><br />
Accept a series of commands on input file descriptor <n>.<br />
Note: additional options set on the command line, and<br />
thru this file descriptor, are not reset for subsequent<br />
commands executed during the same run.<br />
<br />
--help Display a brief help message.<br />
<br />
--force-help<br />
Give help about the --force-thing options.<br />
<br />
-Dh, --debug=help<br />
Give help about debugging options.<br />
<br />
--licence, --license<br />
Display dpkg licence.<br />
<br />
--version<br />
Display dpkg version information.<br />
<br />
dpkg-deb actions<br />
See dpkg-deb(1) for more information about the following<br />
actions.<br />
<br />
-b, --build directory [archive|directory]<br />
Build a deb package.<br />
-c, --contents archive<br />
List contents of a deb package.<br />
-e, --control filename [directory]<br />
Extract control-information from a package.<br />
-x, --extract archive directory<br />
Extract the files contained by package.<br />
-X, --vextract archive directory<br />
Extract and display the filenames contained by a<br />
package.<br />
-f, --field archive [control-field...]<br />
Display control field(s) of a package.<br />
--fsys-tarfile archive<br />
Display the filesystem tar-file contained by a<br />
Debian package.<br />
-I, --info archive [control-file...]<br />
Show information about a package.<br />
<br />
<br />
dpkg-query actions<br />
See dpkg-query(1) for more information about the follow‐<br />
ing actions.<br />
<br />
<br />
-l, --list package-name-pattern...<br />
List packages matching given pattern.<br />
-s, --status package-name...<br />
Report status of specified package.<br />
-L, --listfiles package-name...<br />
List files installed to your system from package-name.<br />
-S, --search filename-search-pattern...<br />
Search for a filename from installed packages.<br />
-p, --print-avail package-name...<br />
Display details about package-name, as found in<br />
/var/lib/dpkg/available. Users of APT-based frontends<br />
should use apt-cache show package-name instead.<br />
<br />
OPTIONS<br />
All options can be specified both on the command line and in the<br />
dpkg configuration file /etc/dpkg/dpkg.cfg or the files on the<br />
configuration directory /etc/dpkg/dpkg.cfg.d/. Each line in the<br />
configuration file is either an option (exactly the same as the<br />
command line option but without leading dashes) or a comment (if<br />
it starts with a #).<br />
<br />
--abort-after=number<br />
Change after how many errors dpkg will abort. The default<br />
is 50.<br />
<br />
-B, --auto-deconfigure<br />
When a package is removed, there is a possibility that<br />
another installed package depended on the removed pack‐<br />
age. Specifying this option will cause automatic decon‐<br />
figuration of the package which depended on the removed<br />
package.<br />
<br />
-Doctal, --debug=octal<br />
Switch debugging on. octal is formed by bitwise-orring<br />
desired values together from the list below (note that<br />
these values may change in future releases). -Dh or<br />
--debug=help display these debugging values.<br />
<br />
number description<br />
1 Generally helpful progress information<br />
2 Invocation and status of maintainer scripts<br />
10 Output for each file processed<br />
100 Lots of output for each file processed<br />
20 Output for each configuration file<br />
200 Lots of output for each configuration file<br />
40 Dependencies and conflicts<br />
400 Lots of dependencies/conflicts output<br />
10000 Trigger activation and processing<br />
20000 Lots of output regarding triggers<br />
40000 Silly amounts of output regarding triggers<br />
1000 Lots of drivel about e.g. the dpkg/info dir<br />
2000 Insane amounts of drivel<br />
<br />
--force-things, --no-force-things, --refuse-things<br />
<br />
Force or refuse (no-force and refuse mean the same thing)<br />
to do some things. things is a comma separated list of<br />
things specified below. --force-help displays a message<br />
describing them. Things marked with (*) are forced by<br />
default.<br />
<br />
Warning: These options are mostly intended to be used by<br />
experts only. Using them without fully understanding<br />
their effects may break your whole system.<br />
<br />
all: Turns on (or off) all force options.<br />
<br />
downgrade(*): Install a package, even if newer version of<br />
it is already installed.<br />
<br />
Warning: At present dpkg does not do any dependency<br />
checking on downgrades and therefore will not warn you if<br />
the downgrade breaks the dependency of some other pack‐<br />
age. This can have serious side effects, downgrading<br />
essential system components can even make your whole sys‐<br />
tem unusable. Use with care.<br />
<br />
configure-any: Configure also any unpacked but unconfig‐<br />
ured packages on which the current package depends.<br />
<br />
hold: Process packages even when marked "hold".<br />
<br />
remove-reinstreq: Remove a package, even if it's broken<br />
and marked to require reinstallation. This may, for exam‐<br />
ple, cause parts of the package to remain on the system,<br />
which will then be forgotten by dpkg.<br />
<br />
remove-essential: Remove, even if the package is consid‐<br />
ered essential. Essential packages contain mostly very<br />
basic Unix commands. Removing them might cause the whole<br />
system to stop working, so use with caution.<br />
<br />
depends: Turn all dependency problems into warnings.<br />
<br />
depends-version: Don't care about versions when checking<br />
dependencies.<br />
<br />
breaks: Install, even if this would break another pack‐<br />
age.<br />
<br />
conflicts: Install, even if it conflicts with another<br />
package. This is dangerous, for it will usually cause<br />
overwriting of some files.<br />
<br />
confmiss: Always install a missing conffile. This is dan‐<br />
gerous, since it means not preserving a change (removing)<br />
made to the file.<br />
<br />
confnew: If a conffile has been modified always install<br />
the new version without prompting, unless the<br />
--force-confdef is also specified, in which case the<br />
default action is preferred.<br />
<br />
confold: If a conffile has been modified always keep the<br />
old version without prompting, unless the --force-confdef<br />
is also specified, in which case the default action is<br />
preferred.<br />
<br />
confdef: If a conffile has been modified always choose<br />
the default action. If there is no default action it will<br />
stop to ask the user unless --force-confnew or<br />
--force-confold is also been given, in which case it will<br />
use that to decide the final action.<br />
<br />
overwrite: Overwrite one package's file with another's<br />
file.<br />
<br />
overwrite-dir Overwrite one package's directory with<br />
another's file.<br />
<br />
overwrite-diverted: Overwrite a diverted file with an<br />
undiverted version.<br />
<br />
architecture: Process even packages with the wrong archi‐<br />
tecture.<br />
<br />
bad-path: PATH is missing important programs, so problems<br />
are likely.<br />
<br />
not-root: Try to (de)install things even when not root.<br />
<br />
bad-verify: Install a package even if it fails authentic‐<br />
ity check.<br />
<br />
<br />
--ignore-depends=package,...<br />
Ignore dependency-checking for specified packages (actu‐<br />
ally, checking is performed, but only warnings about con‐<br />
flicts are given, nothing else).<br />
<br />
--new, --old<br />
Select new or old binary package format. This is a<br />
dpkg-deb(1) option.<br />
<br />
--nocheck<br />
Don't read or check contents of control file while build‐<br />
ing a package. This is a dpkg-deb(1) option.<br />
<br />
--no-act, --dry-run, --simulate<br />
Do everything which is supposed to be done, but don't<br />
write any changes. This is used to see what would happen<br />
with the specified action, without actually modifying<br />
anything.<br />
<br />
Be sure to give --no-act before the action-parameter, or<br />
you might end up with undesirable results. (e.g. dpkg<br />
--purge foo --no-act will first purge package foo and<br />
then try to purge package --no-act, even though you prob‐<br />
ably expected it to actually do nothing)<br />
<br />
-R, --recursive<br />
Recursively handle all regular files matching pattern<br />
*.deb found at specified directories and all of its sub‐<br />
directories. This can be used with -i, -A, --install,<br />
--unpack and --avail actions.<br />
<br />
-G Don't install a package if a newer version of the same<br />
package is already installed. This is an alias of<br />
--refuse-downgrade.<br />
<br />
--admindir=dir<br />
Change default administrative directory, which contains<br />
many files that give information about status of<br />
installed or uninstalled packages, etc. (Defaults to<br />
/var/lib/dpkg)<br />
<br />
--instdir=dir<br />
Change default installation directory which refers to the<br />
directory where packages are to be installed. instdir is<br />
also the directory passed to chroot(2) before running<br />
package's installation scripts, which means that the<br />
scripts see instdir as a root directory. (Defaults to /)<br />
<br />
--root=dir<br />
Changing root changes instdir to dir and admindir to<br />
dir/var/lib/dpkg.<br />
<br />
-O, --selected-only<br />
Only process the packages that are selected for installa‐<br />
tion. The actual marking is done with dselect or by dpkg,<br />
when it handles packages. For example, when a package is<br />
removed, it will be marked selected for deinstallation.<br />
<br />
-E, --skip-same-version<br />
Don't install the package if the same version of the<br />
package is already installed.<br />
<br />
--pre-invoke=command<br />
--post-invoke=command<br />
Set an invoke hook command to be run via “sh -c” before<br />
or after the dpkg run for the unpack, configure, install,<br />
triggers-only, remove and purge dpkg actions. This option<br />
can be specified multiple times. The order the options<br />
are specified is preserved, with the ones from the con‐<br />
figuration files taking precedence. The environment<br />
variable DPKG_HOOK_ACTION is set for the hooks to the<br />
current dpkg action. Note: front-ends might call dpkg<br />
several times per invocation, which might run the hooks<br />
more times than expected.<br />
<br />
--status-fd n<br />
Send machine-readable package status and progress infor‐<br />
mation to file descriptor n. This option can be specified<br />
multiple times. The information is generally one record<br />
per line, in one of the following forms:<br />
<br />
status: package: status<br />
Package status changed; status is as in the status<br />
file.<br />
<br />
status: package : error : extended-error-message<br />
An error occurred. Unfortunately at the time of<br />
writing extended-error-message can contain new‐<br />
lines, although in locales where the translators<br />
have not made mistakes every newline is followed<br />
by at least one space.<br />
<br />
status: file : conffile-prompt : 'real-old' 'real-new'<br />
useredited distedited<br />
User is being asked a conffile question.<br />
<br />
processing: stage: package<br />
Sent just before a processing stage starts. stage<br />
is one of upgrade, install (both sent before<br />
unpacking), configure, trigproc, disappear,<br />
remove, purge.<br />
<br />
--log=filename<br />
Log status change updates and actions to filename,<br />
instead of the default /var/log/dpkg.log. If this option<br />
is given multiple times, the last filename is used. Log<br />
messages are of the form `YYYY-MM-DD HH:MM:SS status<br />
<state> <pkg> <installed-version>' for status change<br />
updates; `YYYY-MM-DD HH:MM:SS <action> <pkg> <installed-><br />
version> <available-version>' for actions where <action><br />
is one of install, upgrade, remove, purge; and `YYYY-MM-<br />
DD HH:MM:SS conffile <filename> <decision>' for conffile<br />
changes where <decision> is either install or keep.<br />
<br />
--no-debsig<br />
Do not try to verify package signatures.<br />
<br />
--no-triggers<br />
Do not run any triggers in this run (activations will<br />
still be recorded). If used with --configure package or<br />
--triggers-only package then the named package postinst<br />
will still be run even if only a triggers run is needed.<br />
Use of this option may leave packages in the improper<br />
triggers-awaited and triggers-pending states. This can be<br />
fixed later by running: dpkg --configure --pending.<br />
<br />
--triggers<br />
Cancels a previous --no-triggers.<br />
<br />
FILES<br />
/etc/dpkg/dpkg.cfg<br />
Configuration file with default options.<br />
<br />
/var/log/dpkg.log<br />
Default log file (see /etc/dpkg/dpkg.cfg(5) and option<br />
--log).<br />
<br />
The other files listed below are in their default directories,<br />
see option --admindir to see how to change locations of these<br />
files.<br />
<br />
/var/lib/dpkg/available<br />
List of available packages.<br />
<br />
/var/lib/dpkg/status<br />
Statuses of available packages. This file contains infor‐<br />
mation about whether a package is marked for removing or<br />
not, whether it is installed or not, etc. See section<br />
INFORMATION ABOUT PACKAGES for more info.<br />
<br />
The status file is backed up daily in /var/backups. It<br />
can be useful if it's lost or corrupted due to filesys‐<br />
tems troubles.<br />
<br />
The following files are components of a binary package. See<br />
deb(5) for more information about them:<br />
<br />
control<br />
<br />
conffiles<br />
<br />
preinst<br />
<br />
postinst<br />
<br />
prerm<br />
<br />
postrm<br />
<br />
ENVIRONMENT VARIABLES<br />
DPKG_NO_TSTP<br />
Define this to something if you prefer dpkg starting a<br />
new shell rather than suspending itself, while doing a<br />
shell escape.<br />
<br />
SHELL The program dpkg will execute when starting a new shell.<br />
<br />
COLUMNS<br />
Sets the number of columns dpkg should use when display‐<br />
ing formatted text. Currently only used by -l.<br />
<br />
DPKG_RUNNING_VERSION<br />
Defined by dpkg on the maintainer script environment to<br />
the version of the currently running dpkg instance.<br />
<br />
DPKG_MAINTSCRIPT_PACKAGE<br />
Defined by dpkg on the maintainer script environment to<br />
the package name being handled.<br />
<br />
DPKG_MAINTSCRIPT_ARCH<br />
Defined by dpkg on the maintainer script environment to<br />
the architecture the package got built for.<br />
<br />
EXAMPLES<br />
To list packages related to the editor vi(1):<br />
dpkg -l '*vi*'<br />
<br />
To see the entries in /var/lib/dpkg/available of two packages:<br />
dpkg --print-avail elvis vim | less<br />
<br />
To search the listing of packages yourself:<br />
less /var/lib/dpkg/available<br />
<br />
To remove an installed elvis package:<br />
dpkg -r elvis<br />
<br />
To install a package, you first need to find it in an archive or<br />
CDROM. The "available" file shows that the vim package is in<br />
section "editors":<br />
cd /cdrom/pool/main/v/vim<br />
dpkg -i vim_4.5-3.deb<br />
<br />
To make a local copy of the package selection states:<br />
dpkg --get-selections >myselections<br />
<br />
You might transfer this file to another computer, and install it<br />
there with:<br />
dpkg --clear-selections<br />
dpkg --set-selections <myselections><br />
<br />
Note that this will not actually install or remove anything, but<br />
just set the selection state on the requested packages. You will<br />
need some other application to actually download and install the<br />
requested packages. For example, run apt-get dselect-upgrade.<br />
<br />
Ordinarily, you will find that dselect(1) provides a more conve‐<br />
nient way to modify the package selection states.<br />
<br />
ADDITIONAL FUNCTIONALITY<br />
Additional functionality can be gained by installing any of the<br />
following packages: apt, aptitude and debsums.<br />
<br />
SEE ALSO<br />
aptitude(1), apt(1), dselect(1), dpkg-deb(1), dpkg-query(1),<br />
deb(5), deb-control(5), dpkg.cfg(5), and dpkg-reconfigure(8).<br />
<br />
BUGS<br />
--no-act usually gives less information than might be helpful.<br />
<br />
AUTHORS<br />
See /usr/share/doc/dpkg/THANKS for the list of people who have<br />
contributed to dpkg.<br />
<br />
<br />
<br />
Debian Project 2009-11-12 dpkg(1)<br />
</myselections></decision></decision></filename></action></available-version></installed-></pkg></action></installed-version></pkg></state></n></n></state></package>Justinhttp://www.blogger.com/profile/10774510706045215599noreply@blogger.com0tag:blogger.com,1999:blog-28539953.post-38761434510922445122010-07-11T23:09:00.004+10:002010-07-19T23:51:43.161+10:00Examples of rpm<ul><li>Display the name of the package which installs the file /etc/exports<br />
<b>rpm -qf /etc/exports</b></li>
<li>Examine the changlog for the installed package postfix<br />
<b>rpm -q -changelog postfix</b></li>
<li>Installed the package is broken. In order to go back to the previous version of the same package<br />
<b>rpm -i -oldpackage packageName</b></li>
<li>Display all the configuration files with path for the installed package<br />
<b>rpm -qc postfix</b></li>
<li>Display all files which will install/installed from the RPM package postfix-2.6.1-2.1.i586 with installation path<br />
<b>rpm -qlp postfix-2.6.1-2.1.i586</b></li>
<li>Update linux kernel <br />
<b>rpm -Uvh kernel-package</b></li>
<li>Update a package only if an earlier version is currently installed<b><br />
rpm -F packageName</b></li>
<li>Remove a installed package<b><br />
rpm -ev packageName</b></li>
<li>list all installed packages<b><br />
rpm -qa </b></li>
<li><b></b></li>
<li><b></b></li>
<a href="http://techtabs.blogspot.com/p/linux.html">Back to Linux LPIC1 Exam Objectives</a> </ul>Justinhttp://www.blogger.com/profile/10774510706045215599noreply@blogger.com0tag:blogger.com,1999:blog-28539953.post-77173962378849896852010-07-11T22:58:00.000+10:002010-07-11T22:58:48.474+10:00Man Page of rpmNAME<br />
rpm - RPM Package Manager<br />
<br />
SYNOPSIS<br />
QUERYING AND VERIFYING PACKAGES:<br />
rpm {-q|--query} [select-options] [query-options]<br />
<br />
<br />
<br />
rpm {-V|--verify} [select-options] [verify-options]<br />
<br />
<br />
<br />
rpm --import PUBKEY ...<br />
<br />
<br />
<br />
rpm {-K|--checksig} [--nosignature] [--nodigest]<br />
PACKAGE_FILE ...<br />
<br />
<br />
INSTALLING, UPGRADING, AND REMOVING PACKAGES:<br />
rpm {-i|--install} [install-options] PACKAGE_FILE ...<br />
<br />
<br />
<br />
rpm {-U|--upgrade} [install-options] PACKAGE_FILE ...<br />
<br />
<br />
<br />
rpm {-F|--freshen} [install-options] PACKAGE_FILE ...<br />
<br />
<br />
<br />
rpm {-e|--erase} [--allmatches] [--nodeps] [--noscripts]<br />
[--notriggers] [--test] PACKAGE_NAME ...<br />
<br />
<br />
MISCELLANEOUS:<br />
rpm {--initdb|--rebuilddb}<br />
<br />
<br />
<br />
rpm {--addsign|--resign} PACKAGE_FILE ...<br />
<br />
<br />
<br />
rpm {--querytags|--showrc}<br />
<br />
<br />
<br />
rpm {--setperms|--setugids} PACKAGE_NAME ...<br />
<br />
<br />
select-options<br />
[PACKAGE_NAME] [-a,--all] [-f,--file FILE]<br />
[-g,--group GROUP] {-p,--package PACKAGE_FILE]<br />
[--fileid MD5] [--hdrid SHA1] [--pkgid MD5] [--tid TID]<br />
[--querybynumber HDRNUM] [--triggeredby PACKAGE_NAME]<br />
[--whatprovides CAPABILITY] [--whatrequires CAPABILITY]<br />
<br />
<br />
query-options<br />
[--changelog] [-c,--configfiles] [-d,--docfiles] [--dump]<br />
[--filesbypkg] [-i,--info] [--last] [-l,--list]<br />
[--provides] [--qf,--queryformat QUERYFMT]<br />
[-R,--requires] [--scripts] [-s,--state]<br />
[--triggers,--triggerscripts]<br />
<br />
<br />
verify-options<br />
[--nodeps] [--nofiles] [--noscripts]<br />
[--nodigest] [--nosignature]<br />
[--nolinkto] [--nofiledigest] [--nosize] [--nouser]<br />
[--nogroup] [--nomtime] [--nomode] [--nordev]<br />
[--nocaps]<br />
<br />
<br />
install-options<br />
[--aid] [--allfiles] [--badreloc] [--excludepath OLDPATH]<br />
[--excludedocs] [--force] [-h,--hash]<br />
[--ignoresize] [--ignorearch] [--ignoreos]<br />
[--includedocs] [--justdb] [--nodeps]<br />
[--nodigest] [--nosignature] [--nosuggest]<br />
[--noorder] [--noscripts] [--notriggers]<br />
[--oldpackage] [--percent] [--prefix NEWPATH]<br />
[--relocate OLDPATH=NEWPATH]<br />
[--replacefiles] [--replacepkgs]<br />
[--test]<br />
<br />
<br />
DESCRIPTION<br />
rpm is a powerful Package Manager, which can be used to build, install,<br />
query, verify, update, and erase individual software packages. A pack-<br />
age consists of an archive of files and meta-data used to install and<br />
erase the archive files. The meta-data includes helper scripts, file<br />
attributes, and descriptive information about the package. Packages<br />
come in two varieties: binary packages, used to encapsulate software to<br />
be installed, and source packages, containing the source code and<br />
recipe necessary to produce binary packages.<br />
<br />
One of the following basic modes must be selected: Query, Verify, Sig-<br />
nature Check, Install/Upgrade/Freshen, Uninstall, Initialize Database,<br />
Rebuild Database, Resign, Add Signature, Set Owners/Groups, Show Query-<br />
tags, and Show Configuration.<br />
<br />
GENERAL OPTIONS<br />
These options can be used in all the different modes.<br />
<br />
-?, --help<br />
Print a longer usage message then normal.<br />
<br />
--version<br />
Print a single line containing the version number of rpm being<br />
used.<br />
<br />
--quiet<br />
Print as little as possible - normally only error messages will<br />
be displayed.<br />
<br />
-v Print verbose information - normally routine progress messages<br />
will be displayed.<br />
<br />
-vv Print lots of ugly debugging information.<br />
<br />
--rcfile FILELIST<br />
Each of the files in the colon separated FILELIST is read<br />
sequentially by rpm for configuration information. Only the<br />
first file in the list must exist, and tildes will be expanded<br />
to the value of $HOME. The default FILELIST is<br />
/usr/lib/rpm/rpmrc:/usr/lib/rpm/red-<br />
hat/rpmrc:/etc/rpmrc:~/.rpmrc.<br />
<br />
--pipe CMD<br />
Pipes the output of rpm to the command CMD.<br />
<br />
--dbpath DIRECTORY<br />
Use the database in DIRECTORY rather than the default path<br />
/var/lib/rpm<br />
<br />
--root DIRECTORY<br />
Use the file system tree rooted at DIRECTORY for all operations.<br />
Note that this means the database within DIRECTORY will be used<br />
for dependency checks and any scriptlet(s) (e.g. %post if<br />
installing, or %prep if building, a package) will be run after a<br />
chroot(2) to DIRECTORY.<br />
<br />
INSTALL AND UPGRADE OPTIONS<br />
In these options, PACKAGE_FILE can be either rpm binary file or ASCII<br />
package manifest (see PACKAGE SELECTION OPTIONS), and may be specified<br />
as an ftp or http URL, in which case the package will be downloaded<br />
before being installed. See FTP/HTTP OPTIONS for information on rpm's<br />
internal ftp and http client support.<br />
<br />
The general form of an rpm install command is<br />
<br />
rpm {-i|--install} [install-options] PACKAGE_FILE ...<br />
<br />
This installs a new package.<br />
<br />
The general form of an rpm upgrade command is<br />
<br />
rpm {-U|--upgrade} [install-options] PACKAGE_FILE ...<br />
<br />
This upgrades or installs the package currently installed to a newer<br />
version. This is the same as install, except all other version(s) of<br />
the package are removed after the new package is installed.<br />
<br />
rpm {-F|--freshen} [install-options] PACKAGE_FILE ...<br />
<br />
This will upgrade packages, but only ones for which an earlier version<br />
is installed.<br />
<br />
<br />
--aid Add suggested packages to the transaction set when needed.<br />
<br />
--allfiles<br />
Installs or upgrades all the missingok files in the package,<br />
regardless if they exist.<br />
<br />
--badreloc<br />
Used with --relocate, permit relocations on all file paths, not<br />
just those OLDPATH's included in the binary package relocation<br />
hint(s).<br />
<br />
--excludepath OLDPATH<br />
Don't install files whose name begins with OLDPATH.<br />
<br />
--excludedocs<br />
Don't install any files which are marked as documentation (which<br />
includes man pages and texinfo documents).<br />
<br />
--force<br />
Same as using --replacepkgs, --replacefiles, and --oldpackage.<br />
<br />
-h, --hash<br />
Print 50 hash marks as the package archive is unpacked. Use<br />
with -v|--verbose for a nicer display.<br />
<br />
--ignoresize<br />
Don't check mount file systems for sufficient disk space before<br />
installing this package.<br />
<br />
--ignorearch<br />
Allow installation or upgrading even if the architectures of the<br />
binary package and host don't match.<br />
<br />
--ignoreos<br />
Allow installation or upgrading even if the operating systems of<br />
the binary package and host don't match.<br />
<br />
--includedocs<br />
Install documentation files. This is the default behavior.<br />
<br />
--justdb<br />
Update only the database, not the filesystem.<br />
<br />
--nodigest<br />
Don't verify package or header digests when reading.<br />
<br />
--nomanifest<br />
Don't process non-package files as manifests.<br />
<br />
--nosignature<br />
Don't verify package or header signatures when reading.<br />
<br />
--nodeps<br />
Don't do a dependency check before installing or upgrading a<br />
package.<br />
<br />
--nosuggest<br />
Don't suggest package(s) that provide a missing dependency.<br />
<br />
--noorder<br />
Don't reorder the packages for an install. The list of packages<br />
would normally be reordered to satisfy dependencies.<br />
<br />
--noscripts<br />
<br />
--nopre<br />
<br />
--nopost<br />
<br />
--nopreun<br />
<br />
--nopostun<br />
Don't execute the scriptlet of the same name. The --noscripts<br />
option is equivalent to<br />
<br />
--nopre --nopost --nopreun --nopostun<br />
<br />
and turns off the execution of the corresponding %pre, %post,<br />
%preun, and %postun scriptlet(s).<br />
<br />
--notriggers<br />
<br />
--notriggerin<br />
<br />
--notriggerun<br />
<br />
--notriggerpostun<br />
Don't execute any trigger scriptlet of the named type. The<br />
--notriggers option is equivalent to<br />
<br />
--notriggerin --notriggerun --notriggerpostun<br />
<br />
and turns off execution of the corresponding %triggerin, %trig-<br />
gerun, and %triggerpostun scriptlet(s).<br />
<br />
--oldpackage<br />
Allow an upgrade to replace a newer package with an older one.<br />
<br />
--percent<br />
Print percentages as files are unpacked from the package<br />
archive. This is intended to make rpm easy to run from other<br />
tools.<br />
<br />
--prefix NEWPATH<br />
For relocatable binary packages, translate all file paths that<br />
start with the installation prefix in the package relocation<br />
hint(s) to NEWPATH.<br />
<br />
--relocate OLDPATH=NEWPATH<br />
For relocatable binary packages, translate all file paths that<br />
start with OLDPATH in the package relocation hint(s) to NEWPATH.<br />
This option can be used repeatedly if several OLDPATH's in the<br />
package are to be relocated.<br />
<br />
--replacefiles<br />
Install the packages even if they replace files from other,<br />
already installed, packages.<br />
<br />
--replacepkgs<br />
Install the packages even if some of them are already installed<br />
on this system.<br />
<br />
--test Do not install the package, simply check for and report poten-<br />
tial conflicts.<br />
<br />
ERASE OPTIONS<br />
The general form of an rpm erase command is<br />
<br />
<br />
rpm {-e|--erase} [--allmatches] [--nodeps] [--noscripts] [--notriggers]<br />
[--test] PACKAGE_NAME ...<br />
<br />
<br />
The following options may also be used:<br />
<br />
--allmatches<br />
Remove all versions of the package which match PACKAGE_NAME.<br />
Normally an error is issued if PACKAGE_NAME matches multiple<br />
packages.<br />
<br />
--nodeps<br />
Don't check dependencies before uninstalling the packages.<br />
<br />
--noscripts<br />
<br />
--nopreun<br />
<br />
--nopostun<br />
Don't execute the scriptlet of the same name. The --noscripts<br />
option during package erase is equivalent to<br />
<br />
--nopreun --nopostun<br />
<br />
and turns off the execution of the corresponding %preun, and<br />
%postun scriptlet(s).<br />
<br />
--notriggers<br />
<br />
--notriggerun<br />
<br />
--notriggerpostun<br />
Don't execute any trigger scriptlet of the named type. The<br />
--notriggers option is equivalent to<br />
<br />
--notriggerun --notriggerpostun<br />
<br />
and turns off execution of the corresponding %triggerun, and<br />
%triggerpostun scriptlet(s).<br />
<br />
--test Don't really uninstall anything, just go through the motions.<br />
Useful in conjunction with the -vv option for debugging.<br />
<br />
QUERY OPTIONS<br />
The general form of an rpm query command is<br />
<br />
<br />
rpm {-q|--query} [select-options] [query-options]<br />
<br />
<br />
You may specify the format that package information should be printed<br />
in. To do this, you use the<br />
<br />
--qf|--queryformat QUERYFMT<br />
<br />
option, followed by the QUERYFMT format string. Query formats are mod-<br />
ified versions of the standard printf(3) formatting. The format is made<br />
up of static strings (which may include standard C character escapes<br />
for newlines, tabs, and other special characters) and printf(3) type<br />
formatters. As rpm already knows the type to print, the type specifier<br />
must be omitted however, and replaced by the name of the header tag to<br />
be printed, enclosed by {} characters. Tag names are case insensitive,<br />
and the leading RPMTAG_ portion of the tag name may be omitted as well.<br />
<br />
Alternate output formats may be requested by following the tag with<br />
:typetag. Currently, the following types are supported:<br />
<br />
:armor Wrap a public key in ASCII armor.<br />
<br />
:arraysize<br />
Display number of elements in array tags.<br />
<br />
:base64<br />
Encode binary data using base64.<br />
<br />
:date Use strftime(3) "%c" format.<br />
<br />
:day Use strftime(3) "%a %b %d %Y" format.<br />
<br />
:depflags<br />
Format dependency flags.<br />
<br />
:fflags<br />
Format file flags.<br />
<br />
:hex Format in hexadecimal.<br />
<br />
:octal Format in octal.<br />
<br />
:perms Format file permissions.<br />
<br />
:pgpsig<br />
Display signature fingerprint and time.<br />
<br />
:shescape<br />
Escape single quotes for use in a script.<br />
<br />
:triggertype<br />
Display trigger suffix.<br />
<br />
:xml Wrap data in simple xml markup.<br />
<br />
For example, to print only the names of the packages queried, you could<br />
use %{NAME} as the format string. To print the packages name and dis-<br />
tribution information in two columns, you could use %-30{NAME}%{DISTRI-<br />
BUTION}. rpm will print a list of all of the tags it knows about when<br />
it is invoked with the --querytags argument.<br />
<br />
There are two subsets of options for querying: package selection, and<br />
information selection.<br />
<br />
PACKAGE SELECTION OPTIONS:<br />
PACKAGE_NAME<br />
Query installed package named PACKAGE_NAME.<br />
<br />
-a, --all<br />
Query all installed packages.<br />
<br />
-f, --file FILE<br />
Query package owning FILE.<br />
<br />
--fileid MD5<br />
Query package that contains a given file identifier, i.e. the<br />
MD5 digest of the file contents.<br />
<br />
-g, --group GROUP<br />
Query packages with the group of GROUP.<br />
<br />
--hdrid SHA1<br />
Query package that contains a given header identifier, i.e. the<br />
SHA1 digest of the immutable header region.<br />
<br />
-p, --package PACKAGE_FILE<br />
Query an (uninstalled) package PACKAGE_FILE. The PACKAGE_FILE<br />
may be specified as an ftp or http style URL, in which case the<br />
package header will be downloaded and queried. See FTP/HTTP<br />
OPTIONS for information on rpm's internal ftp and http client<br />
support. The PACKAGE_FILE argument(s), if not a binary package,<br />
will be interpreted as an ASCII package manifest unless --noman-<br />
ifest option is used. In manifests, comments are permitted,<br />
starting with a '#', and each line of a package manifest file<br />
may include white space separated glob expressions, including<br />
URL's, that will be expanded to paths that are substituted in<br />
place of the package manifest as additional PACKAGE_FILE argu-<br />
ments to the query.<br />
<br />
--pkgid MD5<br />
Query package that contains a given package identifier, i.e. the<br />
MD5 digest of the combined header and payload contents.<br />
<br />
--querybynumber HDRNUM<br />
Query the HDRNUMth database entry directly; this is useful only<br />
for debugging.<br />
<br />
--specfile SPECFILE<br />
Parse and query SPECFILE as if it were a package. Although not<br />
all the information (e.g. file lists) is available, this type of<br />
query permits rpm to be used to extract information from spec<br />
files without having to write a specfile parser.<br />
<br />
--tid TID<br />
Query package(s) that have a given TID transaction identifier. A<br />
unix time stamp is currently used as a transaction identifier.<br />
All package(s) installed or erased within a single transaction<br />
have a common identifier.<br />
<br />
--triggeredby PACKAGE_NAME<br />
Query packages that are triggered by package(s) PACKAGE_NAME.<br />
<br />
--whatprovides CAPABILITY<br />
Query all packages that provide the CAPABILITY capability.<br />
<br />
--whatrequires CAPABILITY<br />
Query all packages that require CAPABILITY for proper function-<br />
ing.<br />
Note that this does not return what requires a given package. A<br />
package usually provides multiple capabilities and file-names on<br />
which other packages may depend. To see the complete dependen-<br />
cies for a package, use -e --test PACKAGE_NAME<br />
<br />
PACKAGE QUERY OPTIONS:<br />
--changelog<br />
Display change information for the package.<br />
<br />
-c, --configfiles<br />
List only configuration files (implies -l).<br />
<br />
-d, --docfiles<br />
List only documentation files (implies -l).<br />
<br />
--dump Dump file information as follows (implies -l):<br />
<br />
<br />
path size mtime filedigest mode owner group isconfig isdoc rdev symlink<br />
<br />
<br />
--filesbypkg<br />
List all the files in each selected package.<br />
<br />
-i, --info<br />
Display package information, including name, version, and<br />
description. This uses the --queryformat if one was specified.<br />
<br />
--last Orders the package listing by install time such that the latest<br />
packages are at the top.<br />
<br />
-l, --list<br />
List files in package.<br />
<br />
--provides<br />
List capabilities this package provides.<br />
<br />
-R, --requires<br />
List capabilities on which this package depends.<br />
<br />
--scripts<br />
List the package specific scriptlet(s) that are used as part of<br />
the installation and uninstallation processes.<br />
<br />
-s, --state<br />
Display the states of files in the package (implies -l). The<br />
state of each file is one of normal, not installed, or replaced.<br />
<br />
--triggers, --triggerscripts<br />
Display the trigger scripts, if any, which are contained in the<br />
package.<br />
<br />
VERIFY OPTIONS<br />
The general form of an rpm verify command is<br />
<br />
<br />
rpm {-V|--verify} [select-options] [verify-options]<br />
<br />
<br />
Verifying a package compares information about the installed files in<br />
the package with information about the files taken from the package<br />
metadata stored in the rpm database. Among other things, verifying<br />
compares the size, MD5 sum, permissions, type, owner and group of each<br />
file. Any discrepancies are displayed. Files that were not installed<br />
from the package, for example, documentation files excluded on instal-<br />
lation using the "--excludedocs" option, will be silently ignored.<br />
<br />
The package selection options are the same as for package querying<br />
(including package manifest files as arguments). Other options unique<br />
to verify mode are:<br />
<br />
--nodeps<br />
Don't verify dependencies of packages.<br />
<br />
--nodigest<br />
Don't verify package or header digests when reading.<br />
<br />
--nofiles<br />
Don't verify any attributes of package files.<br />
<br />
--noscripts<br />
Don't execute the %verifyscript scriptlet (if any).<br />
<br />
--nosignature<br />
Don't verify package or header signatures when reading.<br />
<br />
--nolinkto<br />
<br />
--nofiledigest (formerly --nomd5)<br />
<br />
--nosize<br />
<br />
--nouser<br />
<br />
--nogroup<br />
<br />
--nomtime<br />
<br />
--nomode<br />
<br />
--nordev<br />
Don't verify the corresponding file attribute.<br />
<br />
The format of the output is a string of 8 characters, a possible<br />
attribute marker:<br />
<br />
c %config configuration file.<br />
d %doc documentation file.<br />
g %ghost file (i.e. the file contents are not included in the package payload).<br />
l %license license file.<br />
r %readme readme file.<br />
<br />
from the package header, followed by the file name. Each of the 8<br />
characters denotes the result of a comparison of attribute(s) of the<br />
file to the value of those attribute(s) recorded in the database. A<br />
single "." (period) means the test passed, while a single "?" (question<br />
mark) indicates the test could not be performed (e.g. file permissions<br />
prevent reading). Otherwise, the (mnemonically emBoldened) character<br />
denotes failure of the corresponding --verify test:<br />
<br />
S file Size differs<br />
M Mode differs (includes permissions and file type)<br />
5 MD5 sum differs<br />
D Device major/minor number mismatch<br />
L readLink(2) path mismatch<br />
U User ownership differs<br />
G Group ownership differs<br />
T mTime differs<br />
P caPabilities differ<br />
<br />
<br />
DIGITAL SIGNATURE AND DIGEST VERIFICATION<br />
The general forms of rpm digital signature commands are<br />
<br />
<br />
<br />
rpm --import PUBKEY ...<br />
<br />
<br />
rpm {--checksig} [--nosignature] [--nodigest]<br />
PACKAGE_FILE ...<br />
<br />
<br />
The --checksig option checks all the digests and signatures contained<br />
in PACKAGE_FILE to ensure the integrity and origin of the package. Note<br />
that signatures are now verified whenever a package is read, and<br />
--checksig is useful to verify all of the digests and signatures asso-<br />
ciated with a package.<br />
<br />
Digital signatures cannot be verified without a public key. An ASCII<br />
armored public key can be added to the rpm database using --import. An<br />
imported public key is carried in a header, and key ring management is<br />
performed exactly like package management. For example, all currently<br />
imported public keys can be displayed by:<br />
<br />
rpm -qa gpg-pubkey*<br />
<br />
Details about a specific public key, when imported, can be displayed by<br />
querying. Here's information about the Red Hat GPG/DSA key:<br />
<br />
rpm -qi gpg-pubkey-db42a60e<br />
<br />
Finally, public keys can be erased after importing just like packages.<br />
Here's how to remove the Red Hat GPG/DSA key<br />
<br />
rpm -e gpg-pubkey-db42a60e<br />
<br />
SIGNING A PACKAGE<br />
rpm --addsign|--resign PACKAGE_FILE ...<br />
<br />
<br />
Both of the --addsign and --resign options generate and insert new sig-<br />
natures for each package PACKAGE_FILE given, replacing any existing<br />
signatures. There are two options for historical reasons, there is no<br />
difference in behavior currently.<br />
<br />
USING GPG TO SIGN PACKAGES<br />
In order to sign packages using GPG, rpm must be configured to run GPG<br />
and be able to find a key ring with the appropriate keys. By default,<br />
rpm uses the same conventions as GPG to find key rings, namely the<br />
$GNUPGHOME environment variable. If your key rings are not located<br />
where GPG expects them to be, you will need to configure the macro<br />
%_gpg_path to be the location of the GPG key rings to use.<br />
<br />
For compatibility with older versions of GPG, PGP, and rpm, only V3<br />
OpenPGP signature packets should be configured. Either DSA or RSA ver-<br />
ification algorithms can be used, but DSA is preferred.<br />
<br />
If you want to be able to sign packages you create yourself, you also<br />
need to create your own public and secret key pair (see the GPG man-<br />
ual). You will also need to configure the rpm macros<br />
<br />
%_signature<br />
The signature type. Right now only gpg and pgp are supported.<br />
<br />
%_gpg_name<br />
The name of the "user" whose key you wish to use to sign your<br />
packages.<br />
<br />
For example, to be able to use GPG to sign packages as the user "John<br />
Doe <jdoe@foo.com>" from the key rings located in /etc/rpm/.gpg using<br />
the executable /usr/bin/gpg you would include<br />
<br />
%_signature gpg<br />
%_gpg_path /etc/rpm/.gpg<br />
%_gpg_name John Doe <jdoe@foo.com><br />
%__gpg /usr/bin/gpg<br />
<br />
in a macro configuration file. Use /etc/rpm/macros for per-system con-<br />
figuration and ~/.rpmmacros for per-user configuration. Typically it's<br />
sufficient to set just %_gpg_name.<br />
<br />
REBUILD DATABASE OPTIONS<br />
The general form of an rpm rebuild database command is<br />
<br />
<br />
rpm {--initdb|--rebuilddb} [-v] [--dbpath DIRECTORY] [--root DIRECTORY]<br />
<br />
<br />
Use --initdb to create a new database if one doesn't already exist<br />
(existing database is not overwritten), use --rebuilddb to rebuild the<br />
database indices from the installed package headers.<br />
<br />
SHOWRC<br />
The command<br />
<br />
rpm --showrc<br />
<br />
shows the values rpm will use for all of the options are currently set<br />
in rpmrc and macros configuration file(s).<br />
<br />
FTP/HTTP OPTIONS<br />
rpm can act as an FTP and/or HTTP client so that packages can be<br />
queried or installed from the internet. Package files for install,<br />
upgrade, and query operations may be specified as an ftp or http style<br />
URL:<br />
<br />
ftp://USER:PASSWORD@HOST:PORT/path/to/package.rpm<br />
<br />
If the :PASSWORD portion is omitted, the password will be prompted for<br />
(once per user/hostname pair). If both the user and password are omit-<br />
ted, anonymous ftp is used. In all cases, passive (PASV) ftp transfers<br />
are performed.<br />
<br />
rpm allows the following options to be used with ftp URLs:<br />
<br />
--ftpproxy HOST<br />
The host HOST will be used as a proxy server for all ftp trans-<br />
fers, which allows users to ftp through firewall machines which<br />
use proxy systems. This option may also be specified by config-<br />
uring the macro %_ftpproxy.<br />
<br />
--ftpport PORT<br />
The TCP PORT number to use for the ftp connection on the proxy<br />
ftp server instead of the default port. This option may also be<br />
specified by configuring the macro %_ftpport.<br />
<br />
rpm allows the following options to be used with http URLs:<br />
<br />
--httpproxy HOST<br />
The host HOST will be used as a proxy server for all http trans-<br />
fers. This option may also be specified by configuring the macro<br />
%_httpproxy.<br />
<br />
--httpport PORT<br />
The TCP PORT number to use for the http connection on the proxy<br />
http server instead of the default port. This option may also be<br />
specified by configuring the macro %_httpport.<br />
<br />
LEGACY ISSUES<br />
Executing rpmbuild<br />
The build modes of rpm are now resident in the /usr/bin/rpmbuild exe-<br />
cutable. Install the package containing rpmbuild (usually rpm-build)<br />
and see rpmbuild(8) for documentation of all the rpm build modes.<br />
<br />
FILES<br />
rpmrc Configuration<br />
/usr/lib/rpm/rpmrc<br />
/usr/lib/rpm/redhat/rpmrc<br />
/etc/rpmrc<br />
~/.rpmrc<br />
<br />
Macro Configuration<br />
/usr/lib/rpm/macros<br />
/usr/lib/rpm/redhat/macros<br />
/etc/rpm/macros<br />
~/.rpmmacros<br />
<br />
Database<br />
/var/lib/rpm/Basenames<br />
/var/lib/rpm/Conflictname<br />
/var/lib/rpm/Dirnames<br />
/var/lib/rpm/Filemd5s<br />
/var/lib/rpm/Group<br />
/var/lib/rpm/Installtid<br />
/var/lib/rpm/Name<br />
/var/lib/rpm/Packages<br />
/var/lib/rpm/Providename<br />
/var/lib/rpm/Provideversion<br />
/var/lib/rpm/Pubkeys<br />
/var/lib/rpm/Removed<br />
/var/lib/rpm/Requirename<br />
/var/lib/rpm/Requireversion<br />
/var/lib/rpm/Sha1header<br />
/var/lib/rpm/Sigmd5<br />
/var/lib/rpm/Triggername<br />
<br />
Temporary<br />
/var/tmp/rpm*<br />
<br />
SEE ALSO<br />
popt(3),<br />
rpm2cpio(8),<br />
rpmbuild(8),<br />
<br />
rpm --help - as rpm supports customizing the options via popt aliases<br />
it's impossible to guarantee that what's described in the manual<br />
matches what's available.<br />
<br />
<br />
http://www.rpm.org/ <url:http: www.rpm.org=""><br />
<br />
AUTHORS<br />
Marc Ewing <marc@redhat.com><br />
Jeff Johnson <jbj@redhat.com><br />
Erik Troan <ewt@redhat.com><br />
<br />
<br />
<br />
Red Hat, Inc. 09 June 2002 RPM(8)<br />
</ewt@redhat.com></jbj@redhat.com></marc@redhat.com></url:http:></jdoe@foo.com></jdoe@foo.com>Justinhttp://www.blogger.com/profile/10774510706045215599noreply@blogger.com0tag:blogger.com,1999:blog-28539953.post-40771920974660166822010-07-11T22:39:00.002+10:002010-07-11T22:39:39.682+10:00Man Page of lsusbNAME<br />
lsusb - list USB devices<br />
<br />
SYNOPSIS<br />
lsusb [ options ]<br />
<br />
DESCRIPTION<br />
lsusb is a utility for displaying information about USB buses in the<br />
system and the devices connected to them.<br />
<br />
<br />
OPTIONS<br />
-v, --verbose<br />
Tells lsusb to be verbose and display detailed information about<br />
the devices shown. This includes configuration descriptors for<br />
the device's current speed. Class descriptors will be shown,<br />
when available, for USB device classes including hub, audio,<br />
HID, communications, and chipcard.<br />
<br />
-s [[bus]:][devnum]<br />
Show only devices in specified bus and/or devnum. Both ID's are<br />
given in decimal and may be omitted.<br />
<br />
-d [vendor]:[product]<br />
Show only devices with the specified vendor and product ID.<br />
Both ID's are given in hexadecimal.<br />
<br />
-D device<br />
Do not scan the /dev/bus/usb directory, instead display only<br />
information about the device whose device file is given. The<br />
device file should be something like /dev/bus/usb/001/001. This<br />
option displays detailed information like the v option; you must<br />
be root to do this.<br />
<br />
-t Tells lsusb to dump the physical USB device hierarchy as a tree.<br />
This overrides the v option.<br />
<br />
-V, --version<br />
Print version information on standard output, then exit suc-<br />
cessfully.<br />
<br />
<br />
RETURN VALUE<br />
If the specified device is not found, a non-zero exit code is returned.<br />
<br />
<br />
FILES<br />
/usr/share/usb.ids<br />
A list of all known USB ID's (vendors, products, classes, sub-<br />
classes and protocols).<br />
<br />
<br />
SEE ALSO<br />
lspci(8), usbview(8).<br />
<br />
<br />
AUTHOR<br />
Thomas Sailer, <sailer@ife.ee.ethz.ch>.<br />
<br />
<br />
<br />
usbutils-0.73 25 January 2005 lsusb(8)<br />
</sailer@ife.ee.ethz.ch>Justinhttp://www.blogger.com/profile/10774510706045215599noreply@blogger.com0tag:blogger.com,1999:blog-28539953.post-88023493529609736062010-07-11T22:37:00.002+10:002010-07-11T22:37:54.749+10:00Man Page of lspciNAME<br />
lspci - list all PCI devices<br />
<br />
SYNOPSIS<br />
lspci [options]<br />
<br />
DESCRIPTION<br />
lspci is a utility for displaying information about PCI buses in the<br />
system and devices connected to them.<br />
<br />
By default, it shows a brief list of devices. Use the options described<br />
below to request either a more verbose output or output intended for<br />
parsing by other programs.<br />
<br />
If you are going to report bugs in PCI device drivers or in lspci<br />
itself, please include output of "lspci -vvx" or even better "lspci<br />
-vvxxx" (however, see below for possible caveats).<br />
<br />
Some parts of the output, especially in the highly verbose modes, are<br />
probably intelligible only to experienced PCI hackers. For exact defi-<br />
nitions of the fields, please consult either the PCI specifications or<br />
the header.h and /usr/include/linux/pci.h include files.<br />
<br />
Access to some parts of the PCI configuration space is restricted to<br />
root on many operating systems, so the features of lspci available to<br />
normal users are limited. However, lspci tries its best to display as<br />
much as available and mark all other information with <access denied=""><br />
text.<br />
<br />
<br />
OPTIONS<br />
Basic display modes<br />
-m Dump PCI device data in a backward-compatible machine readable<br />
form. See below for details.<br />
<br />
-mm Dump PCI device data in a machine readable form for easy parsing<br />
by scripts. See below for details.<br />
<br />
-t Show a tree-like diagram containing all buses, bridges, devices<br />
and connections between them.<br />
<br />
<br />
Display options<br />
-v Be verbose and display detailed information about all devices.<br />
<br />
-vv Be very verbose and display more details. This level includes<br />
everything deemed useful.<br />
<br />
-vvv Be even more verbose and display everything we are able to<br />
parse, even if it doesn't look interesting at all (e.g., unde-<br />
fined memory regions).<br />
<br />
-k Show kernel drivers handling each device and also kernel modules<br />
capable of handling it. Turned on by default when -v is given<br />
in the normal mode of output. (Currently works only on Linux<br />
with kernel 2.6 or newer.)<br />
<br />
-x Show hexadecimal dump of the standard part of the configuration<br />
space (the first 64 bytes or 128 bytes for CardBus bridges).<br />
<br />
-xxx Show hexadecimal dump of the whole PCI configuration space. It<br />
is available only to root as several PCI devices crash when you<br />
try to read some parts of the config space (this behavior proba-<br />
bly doesn't violate the PCI standard, but it's at least very<br />
stupid). However, such devices are rare, so you needn't worry<br />
much.<br />
<br />
-xxxx Show hexadecimal dump of the extended (4096-byte) PCI configura-<br />
tion space available on PCI-X 2.0 and PCI Express buses.<br />
<br />
-b Bus-centric view. Show all IRQ numbers and addresses as seen by<br />
the cards on the PCI bus instead of as seen by the kernel.<br />
<br />
-D Always show PCI domain numbers. By default, lspci suppresses<br />
them on machines which have only domain 0.<br />
<br />
<br />
Options to control resolving ID's to names<br />
-n Show PCI vendor and device codes as numbers instead of looking<br />
them up in the PCI ID list.<br />
<br />
-nn Show PCI vendor and device codes as both numbers and names.<br />
<br />
-q Use DNS to query the central PCI ID database if a device is not<br />
found in the local pci.ids file. If the DNS query succeeds, the<br />
result is cached in ~/.pciids-cache and it is recognized in sub-<br />
sequent runs even if -q is not given any more. Please use this<br />
switch inside automated scripts only with caution to avoid over-<br />
loading the database servers.<br />
<br />
-qq Same as -q, but the local cache is reset.<br />
<br />
-Q Query the central database even for entries which are recognized<br />
locally. Use this if you suspect that the displayed entry is<br />
wrong.<br />
<br />
<br />
Options for selection of devices<br />
-s [[[[<domain>]:]<bus>]:][<slot>][.[<func>]]<br />
Show only devices in the specified domain (in case your machine<br />
has several host bridges, they can either share a common bus<br />
number space or each of them can address a PCI domain of its<br />
own; domains are numbered from 0 to ffff), bus (0 to ff), slot<br />
(0 to 1f) and function (0 to 7). Each component of the device<br />
address can be omitted or set to "*", both meaning "any value".<br />
All numbers are hexadecimal. E.g., "0:" means all devices on<br />
bus 0, "0" means all functions of device 0 on any bus, "0.3"<br />
selects third function of device 0 on all buses and ".4" shows<br />
only the fourth function of each device.<br />
<br />
-d [<vendor>]:[<device>]<br />
Show only devices with specified vendor and device ID. Both ID's<br />
are given in hexadecimal and may be omitted or given as "*",<br />
both meaning "any value".<br />
<br />
<br />
Other options<br />
-i <file><br />
Use <file> as the PCI ID list instead of /usr/share/pci.ids.<br />
<br />
-p <file><br />
Use <file> as the map of PCI ID's handled by kernel modules. By<br />
default, lspci uses /lib/modules/kernel_version/modules.pcimap.<br />
Applies only to Linux systems with recent enough module tools.<br />
<br />
-M Invoke bus mapping mode which performs a thorough scan of all<br />
PCI devices, including those behind misconfigured bridges, etc.<br />
This option gives meaningful results only with a direct hardware<br />
access mode, which usually requires root privileges. Please<br />
note that the bus mapper only scans PCI domain 0.<br />
<br />
--version<br />
Shows lspci version. This option should be used stand-alone.<br />
<br />
<br />
PCI access options<br />
The PCI utilities use the PCI library to talk to PCI devices (see<br />
pcilib(7) for details). You can use the following options to influence<br />
its behavior:<br />
<br />
-A <method><br />
The library supports a variety of methods to access the PCI<br />
hardware. By default, it uses the first access method avail-<br />
able, but you can use this option to override this decision. See<br />
-A help for a list of available methods and their descriptions.<br />
<br />
-O </method></file></file></file></file></device></vendor></func></slot></bus></domain></access ><br />
<param />=<value><br />
The behavior of the library is controlled by several named<br />
parameters. This option allows to set the value of any of the<br />
parameters. Use -O help for a list of known parameters and their<br />
default values.<br />
<br />
-H1 Use direct hardware access via Intel configuration mechanism 1.<br />
(This is a shorthand for -A intel-conf1.)<br />
<br />
-H2 Use direct hardware access via Intel configuration mechanism 2.<br />
(This is a shorthand for -A intel-conf2.)<br />
<br />
-F <file><br />
Instead of accessing real hardware, read the list of devices and<br />
values of their configuration registers from the given file pro-<br />
duced by an earlier run of lspci -x. This is very useful for<br />
analysis of user-supplied bug reports, because you can display<br />
the hardware configuration in any way you want without disturb-<br />
ing the user with requests for more dumps.<br />
<br />
-G Increase debug level of the library.<br />
<br />
<br />
MACHINE READABLE OUTPUT<br />
If you intend to process the output of lspci automatically, please use<br />
one of the machine-readable output formats (-m, -vm, -vmm) described in<br />
this section. All other formats are likely to change between versions<br />
of lspci.<br />
<br />
<br />
All numbers are always printed in hexadecimal. If you want to process<br />
numeric ID's instead of names, please add the -n switch.<br />
<br />
<br />
Simple format (-m)<br />
In the simple format, each device is described on a single line, which<br />
is formatted as parameters suitable for passing to a shell script,<br />
i.e., values separated by whitespaces, quoted and escaped if necessary.<br />
Some of the arguments are positional: slot, class, vendor name, device<br />
name, subsystem vendor name and subsystem name (the last two are empty<br />
if the device has no subsystem); the remaining arguments are option-<br />
like:<br />
<br />
<br />
-rrev Revision number.<br />
<br />
<br />
-pprogif<br />
Programming interface.<br />
<br />
<br />
The relative order of positional arguments and options is undefined.<br />
New options can be added in future versions, but they will always have<br />
a single argument not separated from the option by any spaces, so they<br />
can be easily ignored if not recognized.<br />
<br />
<br />
Verbose format (-vmm)<br />
The verbose output is a sequence of records separated by blank lines.<br />
Each record describes a single device by a sequence of lines, each line<br />
containing a single `tag: value' pair. The tag and the value are sepa-<br />
rated by a single tab character. Neither the records nor the lines<br />
within a record are in any particular order. Tags are case-sensitive.<br />
<br />
<br />
The following tags are defined:<br />
<br />
<br />
Slot The name of the slot where the device resides<br />
([domain:]bus:device.function). This tag is always the first in<br />
a record.<br />
<br />
<br />
Class Name of the class.<br />
<br />
<br />
Vendor Name of the vendor.<br />
<br />
<br />
Device Name of the device.<br />
<br />
<br />
SVendor<br />
Name of the subsystem vendor (optional).<br />
<br />
<br />
SDevice<br />
Name of the subsystem (optional).<br />
<br />
<br />
PhySlot<br />
The physical slot where the device resides (optional, Linux<br />
only).<br />
<br />
<br />
Rev Revision number (optional).<br />
<br />
<br />
ProgIf Programming interface (optional).<br />
<br />
<br />
Driver Kernel driver currently handling the device (optional, Linux<br />
only).<br />
<br />
<br />
Module Kernel module reporting that it is capable of handling the<br />
device (optional, Linux only).<br />
<br />
<br />
New tags can be added in future versions, so you should silently ignore<br />
any tags you don't recognize.<br />
<br />
<br />
Backward-compatible verbose format (-vm)<br />
In this mode, lspci tries to be perfectly compatible with its old ver-<br />
sions. It's almost the same as the regular verbose format, but the<br />
Device tag is used for both the slot and the device name, so it occurs<br />
twice in a single record. Please avoid using this format in any new<br />
code.<br />
<br />
<br />
FILES<br />
/usr/share/pci.ids<br />
A list of all known PCI ID's (vendors, devices, classes and sub-<br />
classes). Maintained at http://pciids.sourceforge.net/, use the<br />
update-pciids utility to download the most recent version.<br />
<br />
/usr/share/pci.ids.gz<br />
If lspci is compiled with support for compression, this file is<br />
tried before pci.ids.<br />
<br />
~/.pciids-cache<br />
All ID's found in the DNS query mode are cached in this file.<br />
<br />
<br />
BUGS<br />
Sometimes, lspci is not able to decode the configuration registers com-<br />
pletely. This usually happens when not enough documentation was avail-<br />
able to the authors. In such cases, it at least prints the mark to<br />
signal that there is potentially something more to say. If you know the<br />
details, patches will be of course welcome.<br />
<br />
Access to the extended configuration space is currently supported only<br />
by the linux_sysfs back-end.<br />
<br />
<br />
SEE ALSO<br />
setpci(8), update-pciids(8), pcilib(7)<br />
<br />
<br />
AUTHOR<br />
The PCI Utilities are maintained by Martin Mares <mj@ucw.cz>.<br />
<br />
<br />
<br />
pciutils-3.1.3 04 July 2009 lspci(8)<br />
</mj@ucw.cz></file></value>Justinhttp://www.blogger.com/profile/10774510706045215599noreply@blogger.com0tag:blogger.com,1999:blog-28539953.post-46843848826469142752010-07-11T22:35:00.000+10:002010-07-11T22:35:20.234+10:00Man Page of lsmodNAME<br />
lsmod - program to show the status of modules in the Linux Kernel<br />
<br />
SYNOPSIS<br />
lsmod<br />
<br />
DESCRIPTION<br />
lsmod is a trivial program which nicely formats the contents of the<br />
/proc/modules, showing what kernel modules are currently loaded.<br />
<br />
COPYRIGHT<br />
This manual page Copyright 2002, Rusty Russell, IBM Corporation.<br />
<br />
SEE ALSO<br />
modprobe(8), modinfo(8)<br />
<br />
<br />
<br />
2002-12-27 LSMOD(8)Justinhttp://www.blogger.com/profile/10774510706045215599noreply@blogger.com0tag:blogger.com,1999:blog-28539953.post-39255237990146722542010-07-11T22:24:00.002+10:002010-07-11T22:24:57.850+10:00Man Page of modprobeMODPROBE(8) MODPROBE(8)<br />
<br />
<br />
<br />
NAME<br />
modprobe - program to add and remove modules from the Linux Kernel<br />
<br />
SYNOPSIS<br />
modprobe [ -v ] [ -V ] [ -C config-file ] [ -n ] [ -i ] [ -q ] [ -b ] [<br />
-o modulename ] [ modulename ] [ module parameters ... ]<br />
<br />
<br />
modprobe [ -r ] [ -v ] [ -n ] [ -i ] [ modulename ... ]<br />
<br />
<br />
modprobe [ -l ] [ -t dirname ] [ wildcard ]<br />
<br />
<br />
modprobe [ -c ]<br />
<br />
<br />
modprobe [ --dump-modversions ] [ filename ... ]<br />
<br />
<br />
DESCRIPTION<br />
modprobe intelligently adds or removes a module from the Linux kernel:<br />
note that for convenience, there is no difference between _ and - in<br />
module names. modprobe looks in the module directory /lib/mod-<br />
ules/`uname -r` for all the modules and other files, except for the<br />
optional /etc/modprobe.conf configuration file and /etc/modprobe.d<br />
directory (see modprobe.conf(5)). modprobe will also use module options<br />
specified on the kernel command line in the form of <module>..<br />
<br />
Note that this version of modprobe does not do anything to the module<br />
itself: the work of resolving symbols and understanding parameters is<br />
done inside the kernel. So module failure is sometimes accompanied by<br />
a kernel message: see dmesg(8).<br />
<br />
modprobe expects an up-to-date modules.dep file, as generated by depmod<br />
(see depmod(8)). This file lists what other modules each module needs<br />
(if any), and modprobe uses this to add or remove these dependencies<br />
automatically. See modules.dep(5)).<br />
<br />
If any arguments are given after the modulename, they are passed to the<br />
kernel (in addition to any options listed in the configuration file).<br />
<br />
OPTIONS<br />
-v --verbose<br />
Print messages about what the program is doing. Usually mod-<br />
probe only prints messages if something goes wrong.<br />
<br />
This option is passed through install or remove commands to<br />
other modprobe commands in the MODPROBE_OPTIONS environment<br />
variable.<br />
<br />
-C --config<br />
This option overrides the default configuration directory/file<br />
(/etc/modprobe.d or /etc/modprobe.conf).<br />
<br />
This option is passed through install or remove commands to<br />
other modprobe commands in the MODPROBE_OPTIONS environment<br />
variable.<br />
<br />
-c --showconfig<br />
Dump out the effective configuration from the config directory<br />
and exit.<br />
<br />
-n --dry-run --show<br />
This option does everything but actually insert or delete the<br />
modules (or run the install or remove commands). Combined with<br />
-v, it is useful for debugging problems.<br />
<br />
-i --ignore-install --ignore-remove<br />
This option causes modprobe to ignore install and remove com-<br />
mands in the configuration file (if any) for the module speci-<br />
fied on the command line (any dependent modules are still sub-<br />
ject to commands set for them in the configuration file). See<br />
modprobe.conf(5).<br />
<br />
-q --quiet<br />
Normally modprobe will report an error if you try to remove or<br />
insert a module it can't find (and isn't an alias or<br />
install/remove command). With this flag, modprobe will simply<br />
ignore any bogus names (the kernel uses this to opportunisti-<br />
cally probe for modules which might exist).<br />
<br />
-r --remove<br />
This option causes modprobe to remove rather than insert a mod-<br />
ule. If the modules it depends on are also unused, modprobe<br />
will try to remove them too. Unlike insertion, more than one<br />
module can be specified on the command line (it does not make<br />
sense to specify module parameters when removing modules).<br />
<br />
There is usually no reason to remove modules, but some buggy<br />
modules require it. Your kernel may not support removal of mod-<br />
ules.<br />
<br />
-V --version<br />
Show version of program and exit.<br />
<br />
-f --force<br />
Try to strip any versioning information from the module which<br />
might otherwise stop it from loading: this is the same as using<br />
both --force-vermagic and --force-modversion. Naturally, these<br />
checks are there for your protection, so using this option is<br />
dangerous.<br />
<br />
This applies to any modules inserted: both the module (or alias)<br />
on the command line and any modules it on which it depends.<br />
<br />
--force-vermagic<br />
Every module contains a small string containing important infor-<br />
mation, such as the kernel and compiler versions. If a module<br />
fails to load and the kernel complains that the "version magic"<br />
doesn't match, you can use this option to remove it. Naturally,<br />
this check is there for your protection, so this using option is<br />
dangerous.<br />
<br />
This applies to any modules inserted: both the module (or alias)<br />
on the command line and any modules on which it depends.<br />
<br />
--force-modversion<br />
When modules are compiled with CONFIG_MODVERSIONS set, a section<br />
detailing the versions of every interfaced used by (or supplied<br />
by) the module is created. If a module fails to load and the<br />
kernel complains that the module disagrees about a version of<br />
some interface, you can use "--force-modversion" to remove the<br />
version information altogether. Naturally, this check is there<br />
for your protection, so using this option is dangerous.<br />
<br />
This applies any modules inserted: both the module (or alias) on<br />
the command line and any modules on which it depends.<br />
<br />
-l --list<br />
List all modules matching the given wildcard (or "*" if no wild-<br />
card is given). This option is provided for backwards compati-<br />
bility: see find(1) and basename(1) for a more flexible alterna-<br />
tive.<br />
<br />
-a --all<br />
Insert all module names on the command line.<br />
<br />
-t --type<br />
Restrict -l to modules in directories matching the dirname<br />
given. This option is provided for backwards compatibility: see<br />
find(1) and basename(1) for a more flexible alternative.<br />
<br />
-s --syslog<br />
This option causes any error messages to go through the syslog<br />
mechanism (as LOG_DAEMON with level LOG_NOTICE) rather than to<br />
standard error. This is also automatically enabled when stderr<br />
is unavailable.<br />
<br />
This option is passed through install or remove commands to<br />
other modprobe commands in the MODPROBE_OPTIONS environment<br />
variable.<br />
<br />
-S --set-version<br />
Set the kernel version, rather than using uname(2) to decide on<br />
the kernel version (which dictates where to find the modules).<br />
<br />
--show-depends<br />
List the dependencies of a module (or alias), including the mod-<br />
ule itself. This produces a (possibly empty) set of module<br />
filenames, one per line, each starting with "insmod". Install<br />
commands which apply are shown prefixed by "install". It does<br />
not run any of the install commands. Note that modinfo(8) can<br />
be used to extract dependencies of a module from the module<br />
itself, but knows nothing of aliases or install commands.<br />
<br />
-o --name<br />
This option tries to rename the module which is being inserted<br />
into the kernel. Some testing modules can usefully be inserted<br />
multiple times, but the kernel refuses to have two modules of<br />
the same name. Normally, modules should not require multiple<br />
insertions, as that would make them useless if there were no<br />
module support.<br />
<br />
--first-time<br />
Normally, modprobe will succeed (and do nothing) if told to<br />
insert a module which is already present or to remove a module<br />
which isn't present. This is ideal for simple scripts; however,<br />
more complicated scripts often want to know whether modprobe<br />
really did something: this option makes modprobe fail for that<br />
case.<br />
<br />
--dump-modversions<br />
Print out a list of module versioning information required by a<br />
module. This option is commonly used by distributions in order<br />
to package up a Linux kernel module using module versioning<br />
deps.<br />
<br />
-b --use-blacklist<br />
This option causes modprobe to apply the blacklist commands in<br />
the configuration files (if any) to module names as well. It is<br />
usually used by udev(7).<br />
<br />
-d --dirname<br />
Directory where modules can be found, /lib/modules/RELEASE by<br />
default.<br />
<br />
--allow-unsupported-modules<br />
Load unsupported modules even if disabled in configuration.<br />
<br />
RETURN VALUE<br />
modprobe returns 0 on success, 1 on an unspecified error and 2 if the<br />
module is not supported. Use the --allow-unsupported-modules option to<br />
force using an unsupported module.<br />
<br />
ENVIRONMENT<br />
The MODPROBE_OPTIONS environment variable can also be used to pass<br />
arguments to modprobe.<br />
<br />
COPYRIGHT<br />
This manual page Copyright 2002, Rusty Russell, IBM Corporation.<br />
<br />
SEE ALSO<br />
modprobe.conf(5), lsmod(8), modinfo(8)<br />
<br />
<br />
<br />
15 September 2009 MODPROBE(8)<br />
</module>Justinhttp://www.blogger.com/profile/10774510706045215599noreply@blogger.com0tag:blogger.com,1999:blog-28539953.post-80439725953523219282010-06-25T17:27:00.000+10:002010-06-25T17:27:26.840+10:00Windows Internet Share through WIFI ad hoc<span class="Apple-style-span" style="color: #444444; font-family: Arial, Verdana, sans-serif; font-size: 13px; line-height: 15px;"></span><br />
<li style="list-style-position: outside; list-style-type: circle;">Open the Network and Sharing Center from windows control panel<div style="display: block; text-align: left;"><a href="http://sites.google.com/a/cityhunter.com.au/justin-work-blog/research-snapshot/windowsinternetsharewithwifiadhoc/network%20sharing%20center.png?attredirects=0" imageanchor="1" style="background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: initial; border-bottom-style: none; border-bottom-width: initial; color: #8a8c50; text-decoration: underline;"><img border="0" height="307" src="http://sites.google.com/a/cityhunter.com.au/justin-work-blog/_/rsrc/1277448656700/research-snapshot/windowsinternetsharewithwifiadhoc/network%20sharing%20center.png?height=307&width=400" style="-webkit-box-shadow: rgb(204, 204, 204) 0px 0px 6px; background-color: white; border-bottom-color: rgb(153, 153, 153); border-bottom-left-radius: 5px 5px; border-bottom-right-radius: 5px 5px; border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(153, 153, 153); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-color: rgb(204, 204, 204); border-top-left-radius: 5px 5px; border-top-right-radius: 5px 5px; border-top-style: solid; border-top-width: 1px; padding-bottom: 7px; padding-left: 7px; padding-right: 7px; padding-top: 7px;" width="400" /></a></div></li><br />
<li style="list-style-position: outside; list-style-type: circle;">Make sure the "Network discovery" is on on the active Internet connection and click "Manage wireless network" on the top left of the window.</li><br />
<li style="list-style-position: outside; list-style-type: circle;">Click "Add" button in the "Manage Wireless Network" window and then select "Create an ad hoc network" in the popped window<br />
<div style="display: block; text-align: left;"><a href="http://sites.google.com/a/cityhunter.com.au/justin-work-blog/research-snapshot/windowsinternetsharewithwifiadhoc/add%20wireless%20Network.png?attredirects=0" imageanchor="1" style="background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: initial; border-bottom-style: none; border-bottom-width: initial; color: #8a8c50; text-decoration: underline;"><img border="0" height="386" src="http://sites.google.com/a/cityhunter.com.au/justin-work-blog/_/rsrc/1277448656595/research-snapshot/windowsinternetsharewithwifiadhoc/add%20wireless%20Network.png?height=386&width=400" style="-webkit-box-shadow: rgb(204, 204, 204) 0px 0px 6px; background-color: white; border-bottom-color: rgb(153, 153, 153); border-bottom-left-radius: 5px 5px; border-bottom-right-radius: 5px 5px; border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(153, 153, 153); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-color: rgb(204, 204, 204); border-top-left-radius: 5px 5px; border-top-right-radius: 5px 5px; border-top-style: solid; border-top-width: 1px; padding-bottom: 7px; padding-left: 7px; padding-right: 7px; padding-top: 7px;" width="400" /></a></div></li><br />
<li style="list-style-position: outside; list-style-type: circle;">Press "Next" button and input the network name and at least 8 characters for password in then next pop up window, then press "Next".After waiting windows create the ad hoc press "Close" button to finish the ad hoc network creatation<br />
<div style="display: block; text-align: left;"><a href="http://sites.google.com/a/cityhunter.com.au/justin-work-blog/research-snapshot/windowsinternetsharewithwifiadhoc/create%20ad%20hoc.png?attredirects=0" imageanchor="1" style="background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: initial; border-bottom-style: none; border-bottom-width: initial; color: #8a8c50; text-decoration: underline;"><img border="0" height="295" src="http://sites.google.com/a/cityhunter.com.au/justin-work-blog/_/rsrc/1277448656649/research-snapshot/windowsinternetsharewithwifiadhoc/create%20ad%20hoc.png?height=295&width=400" style="-webkit-box-shadow: rgb(204, 204, 204) 0px 0px 6px; background-color: white; border-bottom-color: rgb(153, 153, 153); border-bottom-left-radius: 5px 5px; border-bottom-right-radius: 5px 5px; border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(153, 153, 153); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-color: rgb(204, 204, 204); border-top-left-radius: 5px 5px; border-top-right-radius: 5px 5px; border-top-style: solid; border-top-width: 1px; padding-bottom: 7px; padding-left: 7px; padding-right: 7px; padding-top: 7px;" width="400" /></a></div></li><br />
<li style="list-style-position: outside; list-style-type: circle;">Go back to "Network Connection" window either by click "Manage Network Connection" on the top left of "Network and Sharing Center" or execute ncpa.cpl in the DOS command line.</li><br />
<li style="list-style-position: outside; list-style-type: circle;">Right click the active Internet connection and go to "sharing" tab</li><br />
<li style="list-style-position: outside; list-style-type: circle;">Tick "Allow other network users to connect through this computer's Internet connection" and "Establish a dial-up connection whenever a computer on my network attempts to access the Internet".<br />
<div style="display: block; text-align: left;"><a href="http://sites.google.com/a/cityhunter.com.au/justin-work-blog/research-snapshot/windowsinternetsharewithwifiadhoc/share%20internet.png?attredirects=0" imageanchor="1" style="background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: initial; border-bottom-style: none; border-bottom-width: initial; color: #8a8c50; text-decoration: underline;"><img border="0" height="400" src="http://sites.google.com/a/cityhunter.com.au/justin-work-blog/_/rsrc/1277449629475/research-snapshot/windowsinternetsharewithwifiadhoc/share%20internet.png?height=400&width=316" style="-webkit-box-shadow: rgb(204, 204, 204) 0px 0px 6px; background-color: white; border-bottom-color: rgb(153, 153, 153); border-bottom-left-radius: 5px 5px; border-bottom-right-radius: 5px 5px; border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(153, 153, 153); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-color: rgb(204, 204, 204); border-top-left-radius: 5px 5px; border-top-right-radius: 5px 5px; border-top-style: solid; border-top-width: 1px; padding-bottom: 7px; padding-left: 7px; padding-right: 7px; padding-top: 7px;" width="316" /></a></div></li><br />
<li style="list-style-position: outside; list-style-type: circle;">Select the network connection which you want to share Internet through in the "Select a private network connection" drop down menu. In this case select "Wireless Network Connection". Finally press "ok" button. </li><br />
<li style="list-style-position: outside; list-style-type: circle;">Now connect other devices to this ad hoc and use DHCP for IP and DNS address to connect to Internet </li>Justinhttp://www.blogger.com/profile/10774510706045215599noreply@blogger.com0tag:blogger.com,1999:blog-28539953.post-55449436218606508872010-06-21T23:00:00.002+10:002010-06-21T23:00:39.092+10:00Linux File Commond<ul><li>Display the absolutly path of the current directory<br />
pwd</li>
<li>Display the contained files and sub directories in the current directory <br />
ls [option] [filenamePattern] <br />
Most used options include -a for displaying all files, -l for displaying all the informations for each file,</li>
<li>Create one/more files<br />
touch file name or file name pattern<br />
eg: touch {report,draft}_{AUG,SEP,NOV}{1,2,3}</li>
<li>Create directory<br />
mkdir</li>
<li>Remove directory<br />
rmdir</li>
<li>Copy files<br />
cp</li>
<li>Move files <br />
mv</li>
<li>Link files<br />
ln -s originalFile linkFile<br />
ln originalFile linkFile</li>
<li>Display information, display all the matches of the wildcard pattern, that usefull to avoid operation on wrong files when use echo before use wildcard pattern delete or move files. <br />
echo [wildcard pattern]</li>
<li>Change the file permissions<br />
chmod permission fileName<br />
Owner Group Others<br />
execute write read execute write read execute write read<br />
1 2 4 1 2 4 1 2 4</li>
<li>Change the file owner<br />
chown username filename</li>
<li>Change the file owner group<br />
chown username:groupName fileName</li>
<li><a href="http://efforttime.tumblr.com/post/697850156/search-files-in-linux" target="_self" title="Search files">Search files</a></li>
<li>wildcard * ? ~</li>
<li>Display file content<br />
<ul><li>cat filename display the contents of the file</li>
<li>less fileName1 [fileName 2 …fileName n] view one or more files at the same time :n(to view next page) :p(to view previous page) to navigate from pages and automaticaly paginates the file.</li>
<li>head -number fileName view the fist number of lines in the file</li>
<li>tail -number fileName view the last number of lines in the file</li>
</ul></li>
</ul>Justinhttp://www.blogger.com/profile/10774510706045215599noreply@blogger.com0tag:blogger.com,1999:blog-28539953.post-6169380544357679782010-06-21T22:59:00.000+10:002010-06-21T22:59:03.480+10:00Linux User Mangement Command<ul><li>Display current user information<br />
<ul><li>w display who is logged on and what they are doing.</li>
<li>whoami display the current user’s username</li>
<li>groups display the current user’s group</li>
<li>id display the uid,gid and groups of the current user</li>
</ul></li>
<li>Create a user<br />
useradd username</li>
<li>Switch between users<br />
su username Note: su - change user to root user and current directory to root’s home directory. su root change user to root user without changing current directory.</li>
</ul>Justinhttp://www.blogger.com/profile/10774510706045215599noreply@blogger.com0