ODOC: lspci

lspci — List all PCI device information.

Summary:

lspci is a utility for displaying information about all PCI buses in the system and all devices connected to them.

Examples:

$ lspci — List all PCI device details in short form.

$ lspci -v — List all PCI device details in long form.

$ lspci -vv — List all PCI device details in very verbose form.

$ lspci -vb — Show PCI device connection in Tree form.

$ lspci -n — Show details in raw form like vendor & device code.

$ lscpi -d 8086: — Show only Intel’s PCI devices.

$ lspci -m — Show the details in more readable form.

$ lspci -x — Show initial PCI configuration details in HEX.

# lspci -xxx — Show whole PCI configuration details in HEX.

Read: man lspci
lspci, pci,linux, odoc, gnu/linux

ODOC: mii-tool

mii-tool — Show/Check/Set the MII status.

Summary:

MII (Media Independent Interface) is a standard bus which connects network interface controllers to physical media interfaces (PHYs). PHYs are usually located on a network interface card itself, but there are cards available which have external MII connectors for attaching external PHYs.

mii-tool display/checks/sets the status of a network interface’s MII unit. Most fast Ethernet adapters use an MII to autonegotiate link speed and duplex setting.

Examples:

# mii-tool — Show shot status info about the network card.

# mii-tool -v — Show detailed status.

# mii-tool -R — Reset the MII unit to default value.

# mii-tool -r — Restart the Auto Negotiation.

# mii-tool -w — Watch the network interface and show if there is any change in the status.(Run it and remove & reconnect the cable).

# mii-tool -F 10baseT-HD — Forcibly set the capability to 10Mpbs and Half Duplex mode.

# mii-tool -A 10baseT-HD, 10baseT-FD — Enable and restart Auto Negotiation, and advertise only the specified capabilities.

Read: man mii-tool
mii-tool,odoc, linux,gnu/linux,network

ODOC: unix2dos

unix2dos — UNIX to DOS text file format converter.

Summary:

Each OS will indicate the line end using Line Feed (LF,10) or Carriage Return (CR,13). Unix uses LF as line end, Windows/DOS uses CR/LF and MacOS uses CR.

So when transferring a file from Linux to DOS, you have to convert the Line end to DOS format. unix2dos will convert the Unix text file to DOS format.

Examples:

$ unix2dos gnu.txt — Convert and replace gnu.txt.

$ unix2dos -n gnu.txt dos.txt — Convert gnu.txt and write into dos.txt

$ unix2dos -k gnu.txt — Convert and replace gnu.txt, while keeping original date stamp.

Read: man unix2dos
unix2dos, dos, unix, mac, linux, odoc, gnu/linux

ODOC: dos2unix

dos2unix — DOS/MAC to UNIX text file format converter.

Summary:

Each OS will indicate the line end using Line Feed (LF,10) or Carriage Return (CR,13). So when transferring a file from DOS to Linux, you have to convert the Line end from DOS format to Linux format.
dos2unix will convert the DOS/MAC Text file to Unix format. Unix uses LF as line end, Windows/DOS uses CR/LF and MacOS uses CR.

Examples:

$ dos2unix dos.txt — Convert and replace dos.txt.

$ dos2unix -n dos.txt gnu.txt — Convert dos.txt and write into gnu.txt

$ dos2unix -k dos.txt — Convert and replace a.txt while keeping original date stamp.

Read: man dos2unix
dos2unix, linux, odoc, gnu/linux, mac, dos, unix

ODOC: rpm

rpm — RedHat Package Manager

Summary:

RPM is a Package Manager, which can be used to build, install, query, verify, update, & erase individual software packages.
A package consists of an archive of files and meta-data used to install & erase the archive files. The meta-data includes helper scripts, file attributes, & descriptive information about the package.
Packages come in two varieties: binary packages, used to encapsulate software to be installed, & source packages, containing the source code & recipe necessary to produce binary packages.

Examples:

$ rpm -qa — List all installed RPMs.

$ rpm -qf /usr/bin/gcc — Show which package installed this file.

$ rpm -qi -filesbypkg gcc-3.2.2-5 — Show the information and list of files from this package

$ rpm -qR gcc-3.2.2-5 — Show the dependency of this package.

$ rpm -q gcc –qf “%-30{NAME} %10{SIZE} %{DISTRIBUTION}n” — Show selected info tags of the package installed gcc.

$ rpm –querytags — Show all supported TAGs.

$ rpm -ivh new.rpm — Install the new RPM. (v – Verbose, h- Show Progress bar).

$ rpm -U latest.rpm — Update an Installed RPM.

$ rpm -F latest.rpm — Freshen (Update only if installed).

$ rpm -e Package-Name — Remove a package.

Read: man rpm
rpm, odoc, linux, gnu/linux

ODOC: adjtimex

adjtimex – Display/Set the kernel time variables.

Summary:

This program gives you raw access to the kernel time variables, like clock tick, frequency, offset, PPL Time constant, etc.

Examples:

$ adjtimex -p — Print current kernel time values.

# adjtimex -w — Provide time details and ask the user to approximate the accuracy.

# adjtimex -c — Periodically (10Sec) compare the system clock with the CMOS clock values and give suggestions.

# adjtimex -t 100001 — Set the no of mSec that should be added to the system time for each kernel tick interrupt.

# adjtimex -f -408033 — Set the system clock frequency offset.

Read: man adjtimex
adjtimex, linux, gnu/linux, odoc

ODOC: bzip2

bzip2 — A Block-sorting file (de)compressor.

Summary:

bzip2 compresses files using the Burrows-Wheeler block sorting text compression algorithm, and Huffman coding. Compression is generally considerably better than the conventional compressors, & approaches the performance of the PPM family of statistical compressors.

Example:

$ bzip2 myfile — Compress & Save it in myfile.bz2. Delete the input file.

$ bzip2 -k myfile — Same as above. But Don’t delete the input file.

$ bzip2 -d myfile.bz2 — Decompress & Save it in myfile. Delete the input file.

$ bzip2 -kd myfile.bz2 — Same as above. But don’t delete the input file.

$ bzip2 -fd myfile.bz2 — Force overwrite of output files (by default not overwrite existing files).

$ bzip2 -t myfile.bz2 — Check the integrity of the compressed file.

$ bzip2 -v myfile — Show the detail status info about the operation.

$ bzip2 -q myfile — Suppress non-essential warning messages.

$ tar -cjvf myfile.tar.bz2 mydir — BZip2 thru TAR command.

$ tar -xjvf myfile.tar.bz2 — BUnZip2 thru TAR command.

Read: man bzip2
odoc, bzip2, linux, gnu/linux

ODOC: unzip

unzip — List, Test & Extract compressed ZIP files.

Summary:

unzip will list, test, or extract files from a ZIP archive. The default behavior (with no options) is to extract into the current directory (and subdirectories below it) all files from the specified ZIP archive.

Example:

$ unzip myfile.zip — Unzip the myfile.zip

$ unzip -t myfile.zip — Test correctness of the file.

$ unzip myfile *.txt — Unzip only *.txt files

$ unzip myfile *.txt *.sxi *.tex — Unzip only *.txt, *.sxi and *.tex files

$ unzip myfile -d /tmp — Unzip the files in /tmp Dir.

$ unzip -f myfile — Unzip files which are newer then current Dir files.

$ unzip -o myfile — Unzip and overwrite existing files without prompting.

Read: man unzip (Lot of examples are available)
unzip, zip, odoc, linux, gnu/linux

ODOC: zip

zip — Package and Compress files in Zip format.

Summary:

zip is a compression and file packaging utility. The zip program puts one or more compressed files into a single zip archive, along with information about the files.

Example:

$ zip stuff * — Create stuff.zip, add current Dir files in it.

$ zip -r myzip mydir — Create myzip.zip, add mydir files in it.

$ zip -j myzip mydir/* — Same as above. But mydir name will not be recorded.

$ zip -rm myzip mydir — Delete the original files after zipping.

$ zip -r myzip mdir -x *~ — Exclude all files that end in ~.

$ zip -u stuff * — If myzip.zip is already exist then, update new and modified files from the current Dir.

$ zip -R foo ‘*.c’ — Travel the Dirs recursively starting at the current directory and zip all C files.

$ zip -n .Z:.zip:.tiff:.gif:.snd myzip * — Create myzip.zip file, add files from current Dir and Don’t try compress the specified files.

$ zip -rt 2005-06-06 myzip mydir — Zip all the files in foo and its subdirs that were last modified on or AFTER 06-06-2005.

$ zip -rtt 2005-06-06 myzip mydir — Zip all the files in foo and its subdirs that were last modified BEFORE 06-06-2005.

Read: man zip (Lot of examples are available)
zip, odoc, linux,gnu/linux

ODOC: tar

tar — Create/Add/Extract Tape ARchives files.

Summary:

tar is an archiving program designed to store and extract files from an archive file known as a tar file. A tar file may be made on a tape drive, however, it is also common to write a tar file to a normal file.

Normally “.tar” file is not a compressed file. It is actually a collection of files within a single file.
“.tar.gz”/ “.tgz” is a collection of files which are compressed. You can also use BZip2 compresion for the tar files.

Example:

$ tar -cf myfile.tar mydir — Create new tar file.

$ tar -cvf myfile.tar mydir — With detail output.

$ tar -tvf myfile.tar — List the content of the tar file.

$ tar -uvf myfile.tar mydir — Update/Append files that are newer than copy in tar.

$ tar -xvf myfile.tar — Extract the tar file.

$ tar -xvf myfile.tar dir1/file1 — Extract only file1 from the tar.

$ tar –delete -vf myfile.tar *.doc — Delete all files with .doc extn from tar file.

$ tar –diff -vf myfile.tar mydir — Differences between archive & mydir

$ tar -czvf myfile.tgz mydir — Tar and GZip the files.

$ tar -xzvf myfile.tgz — Extract the tgz file.

$ tar -cZvf myfile.tgz mydir — Tar and compress the files.

$ tar -xZvf myfile.tgz — Extract the tgz file.

Read: man tar
tar, odoc, linux, gnu/linux