Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple archives

Status
Not open for further replies.

Igaduma

Technical User
Nov 23, 2001
322
BE
Hello Forum,
I need to create multiple archives of a 2Gb file & mail that to a client.
The automatic mail&attachement script is working but I have no clue on how to actually create 1.5Mb archives out of 2Gb file when the target is not a tapedevice but a disk.
I kept this problem as last, always tried nice single files....but eventually I have to tackle this.
How can you do something like this ?

At this point I'm ready to go for any solution whatsoever, I searched high & low, came across the k size & M options for tar on numerous sites but all to no avail...

thanks for any help list :)

Iga

 
You may kick yourself when I tell you this but there is a command called 'split' which, if I'm reading your question correctly, will do exactly what you want. Have a read of the man page, it's fairly obvious but to get you started try:

split -b 1500k [file_name] [new_file_name]

You're going to end up with a lot of files.

The person at the other end can join the files using 'cat':

cat [first_file] > [joined_file]
cat [second_file] >> [joined_file]
cat [third_file] >> [joined_file]
...

Post again if you need further help.

spoodie
===================
"I say we take off and nuke the entire site from orbit. That's the only way to be sure."
 
and in dos we go
type file1 > combined
type file2 > combined

I am one happy little pig,

Iga




-Scientific Progress Goes "Boink"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top