Today i discovered one of the lots of the powerful things you can do thanks to kde. Imagine you are writing a script to decompress a tar.bz2 and install it somewhere, imagine the target user may not even have bzip2 installed but you know for sure he has kde installed, what do you do?
kfmclient copy tar:/path/to/the/file.tar.bz2 /path/to/the/new/destination
And voilĂ , the tar.bz2 is descompressed inside /path/to/the/new/destination :-)
6 comments:
If ark does something like this, that doesn't work, i once did a partial 'rm -rf /' (i had a good reason, just overlooked a circumstance that should have protected me, and i manged to save my system without rebooting or anything)
Ark doesn't work in that situation because it called /bin/tar (which itself calls bzip2 if it needs to), so I'm assuming that this is what your kde command does too
Hmmm, you could just to "tar -xjf" to get the same effect.
this only works if we're linked against libbz2 ... ;-)
AFAIK it uses ktar that is a kdelibs implementation of the tar format (or it seems to me not that i'm a tar expert http://websvn.kde.org/trunk/KDE/kdelibs/kio/kio/ktar.cpp?rev=409203&view=markup )
$ rpm -q --whatrequires libbz2.so.1
python-2.3.3-6
bzip2-1.0.2-12.1
rpm-python-4.3.1-0.3
gnupg-1.2.4-2.1
net-snmp-5.1.1-2
gnome-vfs2-2.6.0-8
libgsf-1.9.0-2
yelp-2.6.0-1
gnome-vfs-1.0.5-18
rpm-build-4.3.1-0.3
rpm-devel-4.3.1-0.3
abiword-2.0.5-2
php-4.3.8-2.1
ImageMagick-5.5.7.21-0.fdr.4.2
imlib2-1.1.2-0.fdr.3.2
kdelibs-3.3.2-1.4.2.kde <---- *******
elinks-0.9.1-1.1
rpm-4.3.1-0.4.1
Does not mean nothing, other parts of kdelibs need libbz2 to work but not ktar, AFAIK you can still build ktar without libbz2
Post a Comment