Reply
Thread Tools
Posts: 98 | Thanked: 3 times | Joined on Nov 2007 @ Knightdale, NC
#1
sorry for the dumb question
 
brendan's Avatar
Posts: 531 | Thanked: 79 times | Joined on Oct 2006 @ This side of insane, that side of genius
#2
tar -xvf /path/to/your/file.tar

or

tar -zxvf /path/to/your/file.tar.gz
__________________
Nokia n800
OS 2008
Pharos iGPS 360-BT
ElmScan 5 BlueTooth
BlackBerry Bold (9000)
AT&T Wireless
 
linux_author's Avatar
Posts: 282 | Thanked: 69 times | Joined on Dec 2007 @ Penniless Park, Fla.
#3
before you untar an archive, take a look:

tar tvzf archive_name.tgz | more

or if bzip'd:

tar tvjf archive_name.tar.bz2 | more

(dunno if bzip is built into busybox - where's the busybox man page for the nokia internet tablet? answer: NO DOCUMENTATION)
 
free's Avatar
Posts: 739 | Thanked: 159 times | Joined on Sep 2007 @ Germany - Munich
#4
and never untar as root!!
 
Posts: 3,841 | Thanked: 1,079 times | Joined on Nov 2006
#5
The initial '-' is optional in tar.
So 'tar xvf file.tar' is the same as 'tar -xvf file.tar'.

'x' -> extract
'v' -> verbose (i.e. list the files as they are extracted. Without it it's silent.)
'f''<name> -> name of file to extract from (unpack)
't' -> list content (tv -> list verbose)
'z' -> the tar file is compressed with gzip (e.g. .tar.gz, .tgz)
'j' -> the tar file is compressed with bzip2 (e.g. .tar.bz2)
'c' -> create (make) a tar archive: tar cvf newtarfile.tar <list of files to archive, or directory name etc.>
(Add z or j if you want it compressed as you go along.)

Note that there are some pecularities in tar's option handling: If you specify two or more parameters that take an argument, e.g. 'b' (block size) and 'f' (file/device name), then the arguments are listed together at the end: tar tbf 20 file.tar

The busybox version of 'tar' on the N800/N810/770 is rather limited, it doesn't have that 'b' option for example. More important, it doesn't have built-in help. If you install GNU tar then just enter 'tar --help' to see the options.
__________________
N800/OS2007|N900/Maemo5
-- Metalayer-crawler delenda est.
-- Current state: Fed up with everything MeeGo.
 

The Following User Says Thank You to TA-t3 For This Useful Post:
speedmartini's Avatar
Posts: 23 | Thanked: 6 times | Joined on Feb 2008
#6
Busybox will not accept "j". I am trying to unpack a bzip2 file using the command xvjf or xjf, and I also tried the above method "tvjf" to view the .tar.bz2 file. In every case Busybox is telling me that "j" is an invalid option. What am I doing wrong? Also, if I try bunzip2 from root -though the file extension is .tar.bz2 - busybox tells me it is not a bzip2 file! This is an attempt to utilize the dictionary files available for mDictionary. FYI this is on an N800 - I started off in Troubleshooting and ended up over here by searching for a relevant thread.

Last edited by speedmartini; 2008-02-27 at 05:01.
 
speedmartini's Avatar
Posts: 23 | Thanked: 6 times | Joined on Feb 2008
#7
Update - Bad File! Good heavens, I wasted about 4 hours trying to figure out what the heck I was doing wrong. Downloaded another dictionary file from Stardict, utililzed bunzip2 in the command line, and then extracted the resulting .tar file just fine!
 
Posts: 3,841 | Thanked: 1,079 times | Joined on Nov 2006
#8
Originally Posted by speedmartini View Post
Busybox will not accept "j". I am trying to unpack a bzip2 file using the command xvjf or xjf, and I also tried the above method "tvjf" to view the .tar.bz2 file. In every case Busybox is telling me that "j" is an invalid option. What am I doing wrong? Also, if I try bunzip2 from root -though the file extension is .tar.bz2 - busybox tells me it is not a bzip2 file! This is an attempt to utilize the dictionary files available for mDictionary. FYI this is on an N800 - I started off in Troubleshooting and ended up over here by searching for a relevant thread.
Most, if not all, non-GNU tar programs won't understand 'j', and some (not including busybox) won't understand 'z' either. The fix is to do as follows instead:

bunzip2 -c file.tar.bz2 | tar tvf -
(to view)
or
bunzip2 -c file.tar.bz2 | tar xvf -
(to unpack)

Ditto for 'z':
gunzip -c file.tar.gz | tar tvf -

(I'm so used to working on non-GNU systems that I usually do the above out of habit even when on a GNU system)
__________________
N800/OS2007|N900/Maemo5
-- Metalayer-crawler delenda est.
-- Current state: Fed up with everything MeeGo.
 

The Following User Says Thank You to TA-t3 For This Useful Post:
qole's Avatar
Moderator | Posts: 7,109 | Thanked: 8,820 times | Joined on Oct 2007 @ Vancouver, BC, Canada
#9
I'm trying to figure out what comes "stock" on an OS2008 N8x0.

I have a tarball that I want to release to the general tablet-owning public.

Obviously, GNU tar does not come "stock", so I can't tell people to "tar xjvf", but it seems that I could gzip my archive and tell people to "tar xzvf" instead.

Can I have some confirmation that bunzip2 comes on a stock N8x0? I could make a little script that does TA-t3's suggested command line, if I can count on bunzip2 being there.
__________________
qole.org --- twitter --- Easy Debian wiki page
Please don't send me a private message, post to the appropriate thread.
Thank you all for your donations!
 
qwerty12's Avatar
Posts: 4,274 | Thanked: 5,358 times | Joined on Sep 2007 @ Looking at y'all and sighing
#10
Newly flashed N800 to latest Diablo image:

~ $ bunzip2
-sh: bunzip2: not found
 

The Following User Says Thank You to qwerty12 For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 18:30.