Reply
Thread Tools
Posts: 4 | Thanked: 0 times | Joined on May 2010 @ Denmark
#1
Hi.

Can I add af file or dir to an existing .tar file?

I start with:
tar -cvf /media/mmc1/archive.tar /home/user/MyDocs

now i fx want to add [/use/bin] folder to it, is that posible?
(I prefer to use the tar program thats default on the N900)

Second. I have searched for the tar manual, but no luck to find the right one.

When I write "tar --help" I got
"Usage: tar -[czxtvO] [-X FILE] [-f TARFILE] [-C DIR] [FILE(s)]..." with I can't use for anything...
 
Posts: 3,617 | Thanked: 2,412 times | Joined on Nov 2009 @ Cambridge, UK
#2
Originally Posted by hyhansen View Post
Can I add af file or dir to an existing .tar file?
You can with GNU tar (via "tar -A") but not (from the looks of it) with the busybox version that's standard on the N900.

Originally Posted by hyhansen View Post
Second. I have searched for the tar manual, but no luck to find the right one.
You need to look at the busybox manual instead: http://www.busybox.net/downloads/BusyBox.html
 

The Following User Says Thank You to Rob1n For This Useful Post:
penguinbait's Avatar
Posts: 3,096 | Thanked: 1,525 times | Joined on Jan 2006 @ Michigan, USA
#3
untar a file

tar xvf file.tar
tar zxvf file.tar.gz
tar zxvf file.tgz

so
mkdir test
cd test
tax zxvf ../file.tar

add the file in the structure under test then retar the file

tar cvf ../newfile.tar .
or

tar czvf ../newfile.tar.gz .

tar czvf ../newfile.tgz .

to add another location just add it

tar czvf ../newfile.tgz /home/usr/MyDocs /bin /lib /root

Hope this helps
__________________
To all my Maemo friends. I will no longer be monitoring any of my threads here on a regular basis. I am no longer supporting anything I did under maemo at maemo.org. If you need some help with something you can reach me at tablethacker.com or www.facebook.com/penguinbait. I have disabled my PM's here, and removed myself from Council email and Community mailing list. There has been some fun times, see you around.

Last edited by penguinbait; 2011-02-03 at 15:31.
 

The Following User Says Thank You to penguinbait For This Useful Post:
Posts: 4 | Thanked: 0 times | Joined on May 2010 @ Denmark
#4
Ok...I will try to figure something out...

But, thanks to both of you
 
Reply


 
Forum Jump


All times are GMT. The time now is 12:48.