Categories
cheat sheets wget

Wget Cheat Sheet

Action Command
Download file wget http://link-to-file
Resumable Downloads wget -c http://link-to-file
Download Entire Website wget -r http://link-to-site
Download Only PDFs from a page wget -A.pdf -r -l1 -nd –no-parent http://link-to-webpage
Download Only mp3 files from a page wget -A.mp3 -r -l1 -nd –no-parent http://link-to-webpage
Donot Download mp3 files from a page wget -R.mp3 -r -l1 -nd –no-parent http://link-to-webpage
Ignore robots.txt wget -erobots=off http://link-to-fileordirectory
Limit download Speed in kbps wget –limit-rate=20 http://url-to-fileorwebsite
Mask as firefox or act as firefox wget -U Mozilla http://your-link-to/file
Categories
cheat sheets commands Info

Dpkg Cheat Sheet


Dpkg Cheat Sheet.

Dpkg is used to manage software management in debian or to install .deb packages. One can view what packages are installed on the system or get information about a package using dpkg. It is very simple and straight forward. Dpkg is like rpm (redhat package manager ) but used in debian like systems. Here is a small list of useful options that make you life peaceful while dealing with installation of .deb packages.


Dpkg Cheat Sheet.

Syntax Description example
dpkg
-i package-name.deb
Install
a new package or upgrade an existing package
dpkg
-i AdobeReader.deb
dpkg -r package-name remove/delete a package
leaving configuration files
dpkg -r d4x
dpkg -P package-name remove/delete a package
and all the configuration files
dpkg -P d4x
dpkg
-R directory
Install
packages from a particular directory recursively.
dpkr
-R /root/debpackages/
dpkg -l lists all packages
installed with description and version information
dpkg -l

dkpg -l|more

dpkg -l|less

dpkg -l *d4x*

dpkg -l package-name List individual installed
packages, along with package version,status of the package and short
description. The output format is same as dpkg -l
dpkg -l d4x
dpkg -L package-name Lists where the files that
come with the package are installed.
dpkg
-L d4x
dkpg -c package.deb List all the files that
are copied or installed in the system with the place where they are
installed
dpkg -c gimp-1.1_i386.deb
dpkg
-S /path-to-file
Lists which package owns
the file.
dpkg
-S /usr/bin/acroread
dpkg -s package-name

or

dpkg -s package| grep Status

gives the status of the
package and other information like

Package, Status, Priority, Section (category of package),
Installed-Size, Maintainer, Architecture, Version, Dependencies
& Description

dpkg -s d4x

or

dpkg -s d4x|grep Status

dpkg -p package-name Gives the information about a package.Package,
Priority, Section (category of package),
Installed-Size, Maintainer, Architecture, Version, Dependencies
&
Description

dpkg -p d4x

Output for dkpg -l|more

Desired=Unknown/Install/Remove/Purge/Hold

|
Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend

|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err:
uppercase=bad)

||/
Name               Version            Description

+++-==============-================================-=============================

ii 
acpi              
0.09-4             displays
information on ACPI devices

ii 
acpid             
1.0.6-8            Utilities
for using ACPI power management

ii 

adduser           
3.107              add
and remove users and groups

ii  adobereader-enu   
8.1.2              Adobe
Reader allows you to view navigate and

ii 
alacarte         

 0.11.3-1           easy
GNOME menu editing tool

ii 
alsa-base          1.0.16-1.1        
ALSA driver configuration files

ii 
alsa-utils         1.0.16-1           ALSA
utilities

Return to top

Output for dpkg -l *d4x*
the output for dpkg -l d4x also will be like below but only
information for d4x package is displayed

Desired=Unknown/Install/Remove/Purge/Hold

|
Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend

|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err:
uppercase=bad)

||/
Name       
   

 Version       Description

+++-===========-======================-===================================

ii 
d4x              2.5.7.1-5     graphical
download manager

ii 
d4x-common       2.5.7.1-5     graphical
download manager - common files

Return to top

Output for dpkg -L d4x
will be like

/.

/usr

/usr/share

/usr/share/pixmaps

/usr/share/pixmaps/nt.xpm

/usr/share/pixmaps/nt.png

/usr/share/locale

/usr/share/locale/ca

/usr/share/locale/ca/LC_MESSAGES

/usr/share/locale/ca/LC_MESSAGES/d4x.mo

/usr/share/locale/zh_CN

/usr/share/locale/zh_CN/LC_MESSAGES

/usr/share/locale/zh_CN/LC_MESSAGES/d4x.mo

/usr/share/locale/de

/usr/share/locale/de/LC_MESSAGES

/usr/share/locale/de/LC_MESSAGES/d4x.mo

/usr/share/locale/ru

/usr/share/locale/ru/LC_MESSAGES

/usr/share/locale/ru/LC_MESSAGES/d4x.mo

/usr/share/locale/bg

/usr/share/locale/bg/LC_MESSAGES

–More–

Return to top

output for dpkg -S
/usr/bin/acroread

adobereader-enu:
/usr/bin/acroread

output for dpkg
-s d4x
 

Package: d4x
Status: install ok installed
Priority: optional
Section: net
Installed-Size: 2028
Maintainer: Debian QA Group Architecture: i386
Version: 2.5.7.1-5
Depends:
libao2 (>= 0.8.8), libatk1.0-0 (>= 1.20.0), libc6 (>=
2.6.1-1), libcairo2 (>= 1.4.0), libfontconfig1 (>= 2.4.0),
libgcc1 (>= 1:4.2.1), libglib2.0-0 (>= 2.14.0), libgtk2.0-0
(>= 2.12.0), libpango1.0-0 (>= 1.18.2), libssl0.9.8 (>=
0.9.8f-1), libstdc++6 (>= 4.2.1), libx11-6, libxcomposite1 (>=
1:0.3-1), libxcursor1 (>> 1.1.2), libxdamage1 (>= 1:1.1),
libxext6, libxfixes3 (>= 1:4.0.1), libxi6, libxinerama1, libxrandr2
(>= 2:1.2.0), libxrender1, d4x-common (= 2.5.7.1-5)
Description: graphical download manager
 Downloader for X is a powerful graphical download manager.
 It supports both HTTP(S) and FTP protocols and has nice graphical
 user interface, though some actions can also be performed using
 the command line.
 .
 Among others, its key features include proxy and SOCKS5 support,
 recursive downloading, wildcard matching, download scheduler,
 multiple download queues and more…
 .
 Homepage: http://www.krasu.ru/soft/chuchelo/

Return to top

Output for dpkg -p comix

Package: comix
Priority: optional
Section: x11
Installed-Size: 1416
Maintainer: Emfox Zhou
Architecture: all
Version: 3.6.4-1.1
Depends: gconf2 (>= 2.10.1-2), python (>= 2.3), python-gtk2 (>= 2.8), python-imaging (>= 1.1.4)
Suggests: libjpeg-progs, unrar
Size: 234988
Description: GTK Comic Book Viewer
 Comix is a comic book viewer. It reads zip, rar, tar, tar.gz and
 tar.bz2 archives (often called .cbz, .cbr and .cbt) as well as
 normal image files. It is written in Python and has a simple user
 interface using PyGTK.
 .
 Main Features:
 .
   * Fullscreen mode.
   * Double page mode.
   * Fit-to-screen mode.
   * Zooming and scrolling.
   * Rotation and mirroring.
   * Magnification lens.
   * Changeable image scaling quality.
   * Image enhancement.
   * Can read right-to-left to fit manga etc.
   * Caching for faster page flipping.
   * Bookmarks support.
   * Customizable GUI.
   * Archive comments support.
   * Archive converter.
   * Thumbnail browser.
   * Standards compliant.
   * Translated to English, Swedish, Simplified Chinese, Spanish,
     Brazilian Portuguese and German.
   * Reads the JPEG, PNG, TIFF, GIF, BMP, ICO, XPM and XBM image formats.
   * Reads ZIP and tar archives natively, and RAR archives through the unrar
     program.
   * Runs on Linux, FreeBSD, NetBSD and virtually any other UNIX-like OS.
   * More!

Return to top