Re: Using tar saving Disk-space [was: apt-get offline]

2001-06-07 Thread Joerg Johannes
Thank you, this is exactly what I was looking for.

Except the line
 tar -u $foo -f packages.tar
has to be changed into
  tar uf packages.tar

The script I was referring to is the one created by apt-get -qq
-print-uris etc.
I would have to add the above line to every downloaded package. I think
your foreach loop is easier

joerg


John Galt wrote:
 
 On Wed, 30 May 2001, Joerg Johannes wrote:
 
 Hi list
 
 Now that I can transfer my downloaded .debs in a .tar file, I wonder if
 I could create this .tar file saving disk space, e.g. in the following
 way
 
 pseudo-code
 create a tar file (touch packages.tar?)
 
 unnecessary, and in fact will break the script...
 
 for *.deb in this directory
 
 foreach foo (./*.deb)
 
1.) add it to the tar file
 
 tar -u $foo -f packages.tar
 
2.) rm this .deb
 
 rm $foo
 
 end
 
 end
 
 /pseudo-code
 
 Is this possible for (non-GNU)-tar?
 
 I think that I made it basic enough to be portable...
 
 How would this look for the csh?
 
 That's what I was writing it for (actually, tcsh, but it should be
 backwards compatible...)
 
 Even better: Could this be included in the wget-script?
 
 ?!  you have a script already that you want to add this stuff to?  That'd
 be easier by far, because you'd only have to select once and not select,
 then select on *.deb.
 
 thanks
 
 joerg
 
 

-- 
Did you know that if you play a Windows 2000 cd backwards, you 
will hear the voice of Satan?

That's nothing!  If you play it forward, it'll install Windows 2000.



Re: Using tar saving Disk-space [was: apt-get offline]

2001-05-30 Thread Bart Martens
You can compress all .deb files into one zipped tar file
with only one command. See the manual page of tar. You 
don't need to write code with a for-loop. I think it's
tar czf packages.tar.gz debdir
with debdir the directory containing all your .deb files,
and packages.tar.gz the target zipped tarfile.


On Wed, May 30, 2001 at 10:36:13AM +0200, Joerg Johannes wrote:
 Hi list
 
 Now that I can transfer my downloaded .debs in a .tar file, I wonder if
 I could create this .tar file saving disk space, e.g. in the following
 way
 
 pseudo-code
 create a tar file (touch packages.tar?)
 for *.deb in this directory
1.) add it to the tar file
2.) rm this .deb
 end
 /pseudo-code
 
 Is this possible for (non-GNU)-tar?
 How would this look for the csh?
 
 Even better: Could this be included in the wget-script?
 thanks 
 
 joerg
 -- 
 Did you know that if you play a Windows 2000 cd backwards, you 
 will hear the voice of Satan?
 
 That's nothing!  If you play it forward, it'll install Windows 2000.
 
 
 -- 
 To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
 with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
 



Re: Using tar saving Disk-space [was: apt-get offline]

2001-05-30 Thread Joerg Johannes

Well, I know how to use tar in general. Zipping the .debs is not
necessary because they are already zipped. What I meant is: The .tar
file takes the same amount of space as the .debs themselves. So after
having tarred them , I need twice the space as before. So I want to
delete each .deb after having it added to the .tar archive (to avoid
exceeding my disk quota ;-) )

joerg

Bart Martens wrote:
 
 You can compress all .deb files into one zipped tar file
 with only one command. See the manual page of tar. You
 don't need to write code with a for-loop. I think it's
 tar czf packages.tar.gz debdir
 with debdir the directory containing all your .deb files,
 and packages.tar.gz the target zipped tarfile.
 
 On Wed, May 30, 2001 at 10:36:13AM +0200, Joerg Johannes wrote:
  Hi list
 
  Now that I can transfer my downloaded .debs in a .tar file, I wonder if
  I could create this .tar file saving disk space, e.g. in the following
  way
 
  pseudo-code
  create a tar file (touch packages.tar?)
  for *.deb in this directory
 1.) add it to the tar file
 2.) rm this .deb
  end
  /pseudo-code
 
  Is this possible for (non-GNU)-tar?
  How would this look for the csh?
 
  Even better: Could this be included in the wget-script?
  thanks
 
  joerg
-- 
Did you know that if you play a Windows 2000 cd backwards, you 
will hear the voice of Satan?

That's nothing!  If you play it forward, it'll install Windows 2000.



Re: Using tar saving Disk-space [was: apt-get offline]

2001-05-30 Thread Matthew Gibbins
And yo was Joerg Johannes heard to yodel:
 
 Well, I know how to use tar in general. Zipping the .debs is not
 necessary because they are already zipped. What I meant is: The .tar
 file takes the same amount of space as the .debs themselves. So after
 having tarred them , I need twice the space as before. So I want to
 delete each .deb after having it added to the .tar archive (to avoid
 exceeding my disk quota ;-) )

   It appears that your problem is one of strategy...IIRC the  --remove-files 
option only effects after the archive is completed..
   However, you could do incremental additions to the archive. 
   i.e. create an archive that fits on the available space, delete the files 
used, then add the next lot to the same archive until
  all files are in the archive.

-- 
 I'm not advocating that anyone take up emacs. Not even me: at my age, I'd be 
more likely to try bungee-jumping. It's easier, and has less risk of causing 
permanent brain damage.
**  A posting on ZDNet forum



Re: Using tar saving Disk-space [was: apt-get offline]

2001-05-30 Thread David Z. Maze
Joerg Johannes [EMAIL PROTECTED] writes:
JJ Now that I can transfer my downloaded .debs in a .tar file, I wonder if
JJ I could create this .tar file saving disk space, e.g. in the following
JJ way
JJ 
JJ pseudo-code
JJ create a tar file (touch packages.tar?)
JJ for *.deb in this directory
JJ1.) add it to the tar file
JJ2.) rm this .deb
JJ end
JJ /pseudo-code
JJ 
JJ Is this possible for (non-GNU)-tar?
JJ How would this look for the csh?

In any shell, you'd probably want

tar cvf deb-packages.tar *.deb
rm *.deb

I'm curious why you want to do this, though; the amount of lost disk 
space is negligible (less than 4K per file), and I believe tar
effectively adds this back in with per-block padding (remember, it was 
written to write archives to tapes).  So the amount of disk space
you'd actually save with this is about zero, give-or-take a little;
it's already been noted that compressing the tar file is a lose, since 
Debian packages are ar archives containing a small indicator file and
two gzipped tar files.

-- 
David Maze [EMAIL PROTECTED]  http://people.debian.org/~dmaze/
Theoretical politics is interesting.  Politicking should be illegal.
-- Abra Mitchell



Re: Using tar saving Disk-space [was: apt-get offline]

2001-05-30 Thread John Galt
On Wed, 30 May 2001, Joerg Johannes wrote:

Hi list

Now that I can transfer my downloaded .debs in a .tar file, I wonder if
I could create this .tar file saving disk space, e.g. in the following
way

pseudo-code
create a tar file (touch packages.tar?)

unnecessary, and in fact will break the script...

for *.deb in this directory

foreach foo (./*.deb)

   1.) add it to the tar file

tar -u $foo -f packages.tar

   2.) rm this .deb

rm $foo

end

end

/pseudo-code

Is this possible for (non-GNU)-tar?

I think that I made it basic enough to be portable...

How would this look for the csh?

That's what I was writing it for (actually, tcsh, but it should be
backwards compatible...)

Even better: Could this be included in the wget-script?

?!  you have a script already that you want to add this stuff to?  That'd
be easier by far, because you'd only have to select once and not select,
then select on *.deb.

thanks

joerg


-- 
There is an old saying that if a million monkeys typed on a million
keyboards for a million years, eventually all the works of Shakespeare
would be produced.   Now, thanks to Usenet, we know this is not true.

Who is John Galt?  [EMAIL PROTECTED], that's who!