Re: Extract file from tar home/

2010-06-10 Thread Ed Greshko
On 06/10/2010 04:50 PM, Mike McCarty wrote: > Patrick O'Callaghan wrote: > > >> On further reflexion and a close reading of "info tar", we find the >> following: >> >> `--occurrence[=NUMBER]' >> This option can be used in conjunction with one of the subcommands >> `--delete', `--diff',

Re: Extract file from tar home/

2010-06-10 Thread Mike McCarty
Patrick O'Callaghan wrote: > On Wed, 2010-06-09 at 00:39 -0430, Patrick O'Callaghan wrote: >> On Tue, 2010-06-08 at 21:55 -0500, Robert Nichols wrote: [...] >>> Even after it has extracted everything you >>> asked for, tar will continue to the end of the archive looking for a >>> possible later ver

Re: Extract file from tar home/

2010-06-09 Thread g
Robert Nichols wrote: > Not so much fun that I'd care to try it again, though. i agree about 'Not so much fun', but you were lucky and had data to put back in. when i learned trick i described, restoring from backup was necessary to recover a unix system that had one of it's drives crash. i le

Re: Extract file from tar home/

2010-06-09 Thread Robert Nichols
On 06/09/2010 09:55 PM, Ed Greshko wrote: > On 06/10/2010 09:20 AM, g wrote: >> Ed Greshko wrote: >> >>> On 06/09/2010 10:30 AM, g wrote: >>> what do you do if archive file gets broken? >>> In the past 10+ years that has not happened. If it does, I'll let you >>> know what I did. F

Re: Extract file from tar home/

2010-06-09 Thread g
Ed Greshko wrote: > On 06/10/2010 09:20 AM, g wrote: >> Ed Greshko wrote: >> >>> On 06/09/2010 10:30 AM, g wrote: >>> what do you do if archive file gets broken? >>> In the past 10+ years that has not happened. If it does, I'll let you >>> know what I did. FWIW, I

Re: Extract file from tar home/

2010-06-09 Thread Robert Nichols
On 06/09/2010 01:13 PM, Patrick O'Callaghan wrote: > On Wed, 2010-06-09 at 00:39 -0430, Patrick O'Callaghan wrote: >> On Tue, 2010-06-08 at 21:55 -0500, Robert Nichols wrote: >>> There is no way other than linear search to find a file in a tar >>> archive, so tar always has to read** from the begin

Re: Extract file from tar home/

2010-06-09 Thread Robert Nichols
On 06/08/2010 10:35 PM, I wrote (without checking first): > > If you ask for just files and not the directories that contain them, > or if the archive doesn't contain entries for the directories, then > the target directories must already exist. Hmmm, that doesn't seem to be true any more. Looks

Re: Extract file from tar home/

2010-06-09 Thread Ed Greshko
On 06/10/2010 09:20 AM, g wrote: > Ed Greshko wrote: > >> On 06/09/2010 10:30 AM, g wrote: >> >>> what do you do if archive file gets broken? >>> >>> >> In the past 10+ years that has not happened. If it does, I'll let you >> know what I did. FWIW, I always compress my archive f

Re: Extract file from tar home/

2010-06-09 Thread g
Ed Greshko wrote: > On 06/09/2010 10:30 AM, g wrote: >> what do you do if archive file gets broken? >> > In the past 10+ years that has not happened. If it does, I'll let you > know what I did. FWIW, I always compress my archive files. may you continue to be blessed with such good fortune. p

Re: Extract file from tar home/

2010-06-09 Thread Suvayu Ali
On Wednesday 09 June 2010 11:13 AM, Patrick O'Callaghan wrote: > On Wed, 2010-06-09 at 00:39 -0430, Patrick O'Callaghan wrote: >> On Tue, 2010-06-08 at 21:55 -0500, Robert Nichols wrote: >>> There is no way other than linear search to find a file in a tar >>> archive, so tar always has to read** fr

Re: Extract file from tar home/

2010-06-09 Thread Patrick O'Callaghan
On Wed, 2010-06-09 at 00:39 -0430, Patrick O'Callaghan wrote: > On Tue, 2010-06-08 at 21:55 -0500, Robert Nichols wrote: > > There is no way other than linear search to find a file in a tar > > archive, so tar always has to read** from the beginning of the archive > > until it comes to a file you w

Re: Extract file from tar home/

2010-06-09 Thread Mike McCarty
Rick Stevens wrote: > > The j option tells tar to use bzip2 instead of gzip. It compresses > tighter, at a commensurate increase in CPU load. It compresses _some_ files more than gzip. IME, most files. It's easy to prove that there is some file which bzip makes larger than the original, and that

Re: Extract file from tar home/

2010-06-09 Thread Mike McCarty
Patrick O'Callaghan wrote: > Without looking at the source code one can't be sure, but I'd be > surprised if that were literally true. IOW I doubt that tar decompresses > everything to a temp file and then searches for the target. It should I know that it does not, as I've done that sort of thing

Re: Extract file from tar home/

2010-06-09 Thread Mike McCarty
Bob Goodwin wrote: > On 07/06/10 19:21, Mike McCarty wrote: >> Either you have a broken tar, or you aren't using it right. It's >> intended to work that way, and has always worked that way. > Sorry, I misunderstood his response to my question. No apology needed. I didn't mean that to sound gruff.

Re: Extract file from tar home/

2010-06-09 Thread Aaron Konstam
On Tue, 2010-06-08 at 19:51 -0400, Bob Goodwin wrote: > On 08/06/10 19:26, Patrick O'Callaghan wrote: > > On Tue, 2010-06-08 at 18:15 -0400, Bob Goodwin wrote: > > > >> Yes, and this is essentially what I did except I tar'd the entire > >> /home/bobg/ directory into one big lump. My quest

Re: Extract file from tar home/

2010-06-09 Thread Aaron Konstam
On Tue, 2010-06-08 at 15:55 -0500, Dale J. Chatham wrote: > Me, too! > > How about the j option? > > On 06/08/2010 03:50 PM, Aaron Konstam wrote: > > > > Again when you are right you are right. I never noticed that the z in > > tar is optional. Thanks, I learned something. Good question. I hope

Re: Extract file from tar home/

2010-06-08 Thread Patrick O'Callaghan
On Tue, 2010-06-08 at 21:55 -0500, Robert Nichols wrote: > There is no way other than linear search to find a file in a tar > archive, so tar always has to read** from the beginning of the archive > until it comes to a file you want. IIRC for uncompressed tarballs this is not strictly the case. Th

Re: Extract file from tar home/

2010-06-08 Thread Robert Nichols
On 06/08/2010 06:51 PM, Bob Goodwin wrote: > On 08/06/10 19:26, Patrick O'Callaghan wrote: >> On Tue, 2010-06-08 at 18:15 -0400, Bob Goodwin wrote: >> >>> Yes, and this is essentially what I did except I tar'd the entire >>> /home/bobg/ directory into one big lump. My question was could I >>>

Re: Extract file from tar home/

2010-06-08 Thread Ed Greshko
On 06/09/2010 10:30 AM, g wrote: > > what do you do if archive file gets broken? > > In the past 10+ years that has not happened. If it does, I'll let you know what I did. FWIW, I always compress my archive files. -- Law stands mute in the midst of arms. -- Marcus Tullius Cicero 葛斯克 愛 德華 / 台

Re: Extract file from tar home/

2010-06-08 Thread Robert Nichols
On 06/08/2010 07:46 PM, Patrick O'Callaghan wrote: > On Tue, 2010-06-08 at 16:36 -0700, Suvayu Ali wrote: >>> To extract only a specific file: >>> $ tar xf bobg.tar.gz the/file/you/want >>> >> >> I think the OP's worry is not whether it can be done, but he wants to >> avoid the time and CPU cycles

Re: Extract file from tar home/

2010-06-08 Thread g
Ed Greshko wrote: > I don't know about anyone else here But if I have a large tar archive > I include as the first file in the archive a "ls" of what is in the > archive. +1 i have a script for cpio'ing that concatenates into a sub directory of; pwd, du -sb *, ls -Ar to a file named archi

Re: Extract file from tar home/

2010-06-08 Thread Ed Greshko
On 06/09/2010 08:46 AM, Patrick O'Callaghan wrote: > On Tue, 2010-06-08 at 16:36 -0700, Suvayu Ali wrote: > >>> To extract only a specific file: >>> $ tar xf bobg.tar.gz the/file/you/want >>> >>> >> I think the OP's worry is not whether it can be done, but he wants to >> avoid the time a

Re: Extract file from tar home/

2010-06-08 Thread Patrick O'Callaghan
On Tue, 2010-06-08 at 16:36 -0700, Suvayu Ali wrote: > > To extract only a specific file: > > $ tar xf bobg.tar.gz the/file/you/want > > > > I think the OP's worry is not whether it can be done, but he wants to > avoid the time and CPU cycles involved in the gunzip step. Since he > has his entire

Re: Extract file from tar home/

2010-06-08 Thread Bob Goodwin
On 08/06/10 19:36, Suvayu Ali wrote: > On Tuesday 08 June 2010 04:26 PM, Patrick O'Callaghan wrote: > >> On Tue, 2010-06-08 at 18:15 -0400, Bob Goodwin wrote: >> >>> Yes, and this is essentially what I did except I tar'd the entire >>> /home/bobg/ directory into one big lump. My que

Re: Extract file from tar home/

2010-06-08 Thread g
Suvayu Ali wrote: > I think the only solution in this case is to do > > $ gunzip bobg.tar.gz > > and keep the resulting bobg.tar file in some easy to access area. A > subsequent > > $ tar xf bobg.tar /path/to/my/file > > should be fast and easy to do. regardless of op's desire, there is no

Re: Extract file from tar home/

2010-06-08 Thread Bob Goodwin
On 08/06/10 19:26, Patrick O'Callaghan wrote: > On Tue, 2010-06-08 at 18:15 -0400, Bob Goodwin wrote: > >> Yes, and this is essentially what I did except I tar'd the entire >> /home/bobg/ directory into one big lump. My question was could I >> go in and unzip individual files. It seems tha

Re: Extract file from tar home/

2010-06-08 Thread Suvayu Ali
On Tuesday 08 June 2010 04:26 PM, Patrick O'Callaghan wrote: > On Tue, 2010-06-08 at 18:15 -0400, Bob Goodwin wrote: >> Yes, and this is essentially what I did except I tar'd the entire >> /home/bobg/ directory into one big lump. My question was could I >> go in and unzip individual files. It

Re: Extract file from tar home/

2010-06-08 Thread g
Bob Goodwin wrote: > I don't think I can "paint myself into a corner?" I usually do though! if you leave everything in one file, you just might. as i mentioned before, what if such a large file gets corrupt in places? -- peace out. tc,hago. g . in a free world without fences, who ne

Re: Extract file from tar home/

2010-06-08 Thread Patrick O'Callaghan
On Tue, 2010-06-08 at 18:15 -0400, Bob Goodwin wrote: > Yes, and this is essentially what I did except I tar'd the entire > /home/bobg/ directory into one big lump. My question was could I > go in and unzip individual files. It seems that can't be done easily. You don't seem to have grokked th

Re: Extract file from tar home/

2010-06-08 Thread Rick Stevens
On 06/08/2010 03:10 PM, Patrick O'Callaghan wrote: > On Tue, 2010-06-08 at 15:55 -0500, Dale J. Chatham wrote: >> Me, too! > > You too what? Oh, I see you're top-posting. Please don't do that. > >> How about the j option? > > Why don't you just try it? I've no idea and don't really care as I use >

Re: Extract file from tar home/

2010-06-08 Thread Bob Goodwin
On 07/06/10 19:24, Mike McCarty wrote: > Bob Goodwin wrote: > > Here's how it's supposed to work... > > > [jmcca...@presario-1 KT-135]$ mkdir check-tar > [jmcca...@presario-1 KT-135]$ cd check-tar > [jmcca...@presario-1 check-tar]$ cp -p ../MVC* . > [jmcca...@presario-1 check-tar]$ ls > MVC-001S.JP

Re: Extract file from tar home/

2010-06-08 Thread Patrick O'Callaghan
On Tue, 2010-06-08 at 15:55 -0500, Dale J. Chatham wrote: > Me, too! You too what? Oh, I see you're top-posting. Please don't do that. > How about the j option? Why don't you just try it? I've no idea and don't really care as I use gzip in these situations. Tell us what you discover. poc --

Re: Extract file from tar home/

2010-06-08 Thread Bob Goodwin
On 07/06/10 19:21, Mike McCarty wrote: > Bob Goodwin wrote: > >> On 07/06/10 18:08, jack craig wrote: >> >>> it only makes sense, zip deflated the individual files and tar is >>> ignorance of that requirement. >>> hence the untar, then unzip. >>> >>> you might consider >>> >>> $tar czvf /

Re: Extract file from tar home/

2010-06-08 Thread Robert Nichols
On 06/08/2010 03:50 PM, Aaron Konstam wrote: > On Tue, 2010-06-08 at 10:16 -0430, Patrick O'Callaghan wrote: >> >>> You man have >>> to say: >>> tar xvzf bobg.tar.gz ./bobg/foo or maybe foo is not at the top of >> the >>> directory. >> >> Any Unix/Linux app that manipulates files clearly has to r

Re: Extract file from tar home/

2010-06-08 Thread Bruno Wolff III
On Tue, Jun 08, 2010 at 15:55:25 -0500, "Dale J. Chatham" wrote: > Me, too! > > How about the j option? When extracting tar figures out whether or not compression is used and what type of compression. So you don't need to use the z or j options when extracting. When creating an archive, you do

Re: Extract file from tar home/

2010-06-08 Thread Dale J. Chatham
Me, too! How about the j option? On 06/08/2010 03:50 PM, Aaron Konstam wrote: > > Again when you are right you are right. I never noticed that the z in > tar is optional. Thanks, I learned something. > -- > === > One of the worst

Re: Extract file from tar home/

2010-06-08 Thread Aaron Konstam
On Tue, 2010-06-08 at 10:16 -0430, Patrick O'Callaghan wrote: > > > You man have > > to say: > > tar xvzf bobg.tar.gz ./bobg/foo or maybe foo is not at the top of > the > > directory. > > Any Unix/Linux app that manipulates files clearly has to refer to them > with pathnames. It hardly seems nec

Re: Extract file from tar home/

2010-06-08 Thread Patrick O'Callaghan
On Tue, 2010-06-08 at 08:30 -0500, Aaron Konstam wrote: > On Mon, 2010-06-07 at 17:57 -0430, Patrick O'Callaghan wrote: > > On Mon, 2010-06-07 at 15:08 -0700, jack craig wrote: > > > it only makes sense, zip deflated the individual files and tar is > > > ignorance of that requirement. > > > hence

Re: Extract file from tar home/

2010-06-08 Thread Aaron Konstam
On Mon, 2010-06-07 at 17:57 -0430, Patrick O'Callaghan wrote: > On Mon, 2010-06-07 at 15:08 -0700, jack craig wrote: > > it only makes sense, zip deflated the individual files and tar is > > ignorance of that requirement. > > hence the untar, then unzip. > > [Please don't top-post on this list.

Re: Extract file from tar home/

2010-06-08 Thread Aaron Konstam
On Mon, 2010-06-07 at 17:58 -0400, Bob Goodwin wrote: > On 07/06/10 17:52, Luc MAIGNAN wrote: > > tar -xzvf bobg.tar.gz file_to_extract > > > > "man tar" is your friend... > > > > Le 07/06/10 23:48, Bob Goodwin a écrit : > > > >> I have /home/bobg/ tar'd to "bobg.tar.gz." Can I extract i

Re: Extract file from tar home/

2010-06-07 Thread Bob Goodwin
On 07/06/10 18:27, Patrick O'Callaghan wrote: > On Mon, 2010-06-07 at 15:08 -0700, jack craig wrote: > >> it only makes sense, zip deflated the individual files and tar is >> ignorance of that requirement. >> hence the untar, then unzip. >> > [Please don't top-post on this list. See the G

Re: Extract file from tar home/

2010-06-07 Thread Mike McCarty
Bob Goodwin wrote: Here's how it's supposed to work... [jmcca...@presario-1 KT-135]$ mkdir check-tar [jmcca...@presario-1 KT-135]$ cd check-tar [jmcca...@presario-1 check-tar]$ cp -p ../MVC* . [jmcca...@presario-1 check-tar]$ ls MVC-001S.JPG MVC-008S.JPG MVC-012S.JPG MVC-017S.JPG MVC-021S.JP

Re: Extract file from tar home/

2010-06-07 Thread g
Bob Goodwin wrote: > On 07/06/10 17:52, Luc MAIGNAN wrote: >> Le 07/06/10 23:48, Bob Goodwin a écrit : >> >>> I have /home/bobg/ tar'd to "bobg.tar.gz." Can I extract individual >>> files or directories without unzipping the entire 17 gigs? >> >> tar -xzvf bobg.tar.gz file_to_extract >> >> "man

Re: Extract file from tar home/

2010-06-07 Thread Mike McCarty
Bob Goodwin wrote: > On 07/06/10 18:08, jack craig wrote: >> it only makes sense, zip deflated the individual files and tar is >> ignorance of that requirement. >> hence the untar, then unzip. >> >> you might consider >> >> $tar czvf /tmp/bob.tar.gz /home/bobg/ >> >> then each file is compressed b

Re: Extract file from tar home/

2010-06-07 Thread Mike McCarty
Bob Goodwin wrote: > I have /home/bobg/ tar'd to "bobg.tar.gz." Can I extract individual > files or directories without unzipping the entire 17 gigs? It depends on how you created the archive, and what you mean by "unzipping the entire". The usual way to do this with tar is either to use o

Re: Extract file from tar home/

2010-06-07 Thread Bob Goodwin
On 07/06/10 18:08, jack craig wrote: > it only makes sense, zip deflated the individual files and tar is > ignorance of that requirement. > hence the untar, then unzip. > > you might consider > > $tar czvf /tmp/bob.tar.gz /home/bobg/ > > then each file is compressed by tar on the way to the tarbal

Re: Extract file from tar home/

2010-06-07 Thread Patrick O'Callaghan
On Mon, 2010-06-07 at 15:08 -0700, jack craig wrote: > it only makes sense, zip deflated the individual files and tar is > ignorance of that requirement. > hence the untar, then unzip. [Please don't top-post on this list. See the Guidelines.] There is nothing in the OP's message to indicate how

Re: Extract file from tar home/

2010-06-07 Thread David Boles
On 6/7/2010 5:48 PM, Bob Goodwin wrote: > > I have /home/bobg/ tar'd to "bobg.tar.gz." Can I extract individual > files or directories without unzipping the entire 17 gigs? As a GUI function - I can't speak for KDE. With Gnome. Open the folder that contains the tar.gz. double click t

Re: Extract file from tar home/

2010-06-07 Thread jack craig
it only makes sense, zip deflated the individual files and tar is ignorance of that requirement. hence the untar, then unzip. you might consider $tar czvf /tmp/bob.tar.gz /home/bobg/ then each file is compressed by tar on the way to the tarball. i think then you can do a $tar xzvf /tmp/bob.ta

Re: Extract file from tar home/

2010-06-07 Thread Bob Goodwin
On 07/06/10 17:52, Luc MAIGNAN wrote: > tar -xzvf bobg.tar.gz file_to_extract > > "man tar" is your friend... > > Le 07/06/10 23:48, Bob Goodwin a écrit : > >> I have /home/bobg/ tar'd to "bobg.tar.gz." Can I extract individual >> files or directories without unzipping the entire 17

Re: Extract file from tar home/

2010-06-07 Thread Luc MAIGNAN
tar -xzvf bobg.tar.gz file_to_extract "man tar" is your friend... Le 07/06/10 23:48, Bob Goodwin a écrit : > I have /home/bobg/ tar'd to "bobg.tar.gz." Can I extract individual > files or directories without unzipping the entire 17 gigs? > > Bob > > -- > > > > -- users m

Re: Extract file from tar home/

2010-06-07 Thread jack craig
i'd say no, the zip file would need to be extracted en-total, then unzipped. lets see if some clever soul can prove me wrong? :) On 06/07/2010 02:48 PM, Bob Goodwin wrote: > I have /home/bobg/ tar'd to "bobg.tar.gz." Can I extract individual > files or directories without unzipping the

Extract file from tar home/

2010-06-07 Thread Bob Goodwin
I have /home/bobg/ tar'd to "bobg.tar.gz." Can I extract individual files or directories without unzipping the entire 17 gigs? Bob -- -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mai