var x, y;
img = getImage("placeholder");
x = getImagePageLeft(img);
y = getImagePageTop(img);
There are currently, 78 guest(s) and 8 member(s) that are online.
You are Anonymous user. You can register for free by clicking here.
Tips 'n' Tricks: Handy commands to access packages Posted on Monday, April 02 @ 21:27:54 BST
Yep, so you've heard all about Debian's super-duper packaging system,
how it's the best thing that ever happened in the Linux package manager world,
etc., etc.. But how do you actually *use* the powerful tools?
Here are some very useful commands that I've come to learn, but it took
me quite a while to dig them up, so I'm posting it here in the hopes that
it will be useful. To other Debian gurus: please add your suggestions/tips
I've come across this file in /etc/something/or/other.txt,
and I want to know which package it belongs to. How?
dpkg -S /etc/something/or/other.txt
I want to find out what exactly is installed by package XYZ. How?
dpkg -L XYZ
This lists all the files installed by package XYZ. You can filter
it through grep to obtain more specific information: for example,
to list all the binaries provided by package XYZ, do this:
dpkg -L XYZ | grep bin/
I'm tight on hard drive space, and package XYZ looks like a candidate
for removal. How do I check which packages depend on it, so that I know
whether or not it's safe to remove? Or, how do I find out the size of a
dpkg -p XYZ will print out the control information
for a package. This includes which packages XYZ depends on, and the package
But it doesn't answer the whole question. So here's what I do:
apt-get -s remove XYZ
Make sure you have the -s there!! This command will pretend to
uninstall XYZ, and apt-get will tell you what other packages (if any) will
be removed if you remove XYZ. This means that the other packages depend
on XYZ. If apt-get doesn't list any other packages to be removed, it means
that nothing depends on XYZ. However, you should check the package description
(dpkg -p XYZ) to make sure that XYZ isn't part of something you
actually use or need.
I've recently upgraded/installed a lot of packages, and my
/var partition seems to be filling up real fast! What's happening?
What's happening? apt-get is caching the package files it downloaded, in /var/apt/cache/....
If you have a small /var partition (like me), it's useful to occasionally
clean it out:
Here's a not-so-well-known fact about dpkg: it understands
shell globbing metacharacters (such as the wildcard *). For example, here's
one way to list all Tcl packages:
dpkg -l 'tcl*'
The backslash is required so that the * gets through to dpkg
untouched by the shell, which might mistakenly think you're trying to
glob for a filename if you don't have the backslash. update the article broke the backslash.. and we changed it to quotes.. (which is a better practise in some cases)