Jump to content

compress a big file


Recommended Posts

Use the "split" command. It will allow you to split a big file into pieces as big as you want them to be. Usage is basically like this (example with 1MB files):

 

$ split –bytes=1m /path/to/large/file /path/to/output/file/prefix

You can change the desired output file size by changing the –bytes=1m to your preference. You can use b, k, or m. b represent bytes, k represent kilobytes, m represent megabytes.

 

For more information about split, run

man split

 

For restoring the file later, run

$ cat prefix* > NEWFILENAME

 

BTW: Using tar also is imho better than only zip for compressing

Link to comment
Share on other sites

It depends what the file is, whether it can be compressed well or not. I guess you know that, right?

 

You don't give us much of a clue what this huge file is, so we can't help much. If it was a text file, then gzip would have compressed it for you. But if the gzipped file is still large then other lossless compression probably wouldn't help either.

 

I'm also guessing that splitting a 144MB file into 144 1MB files isn't too practical for email either - you'd still be sending 144MB by email.

 

So it depends what it is - an mp3 file? A video file? An executable? A zipped directory of images? A Word document? Each of those _could_ be compressed somehow, with varying levels of difficulty, but you'd probably have to unpack them, compress some part(s) with a kind of lossy compression (losing quality) and then repacking.

 

Or buy a cheap USB stick, save your file on it, and then post it :)

Link to comment
Share on other sites

I think the compression direction has been covered, but here are some alternative approaches to transferring files across the net:

  • Try one of these on-line/cloud storage servies; most offer free up to 1-2 GByte; A-Drive claims up to 50 Gb. They all have ways to allow selected others access to download. Don't expect to much on security (mainly a random URL; anybody who happens to land on this will be able to download it), but mostly that is OK. You could encrypt the file using gpg to reduce the risks. I use A-drive (occasionally), but that is more a random choice than the product of testing/reviewing or lots of experience.
  • Yet another approach would be to upload direct from your PC to the PC who wants to download this file. There are multiple ways to skin cats this particular way: FIlePhile and JetBytes I have tried neither of the two but reviews I read sound OK.
  • The following python one-liner will start a webserver on your PC listening to port 80: python -c "import SimpleHTTPServer;SimpleHTTPServer.test()"

Link to comment
Share on other sites

7-zip offers better compression ratios... and if it's an imagefile, you can always use gimp2 to resize/change dpi/change format in a comprehensive and convenient way.

Surely enough, there are also other methods to manipulate images, but (IMHO) nothing comes close to the mighty gimp.

Thanks for your help, yes I faced this problem when I edit some images by gimp, it becomes large compred with the original image and this make my pdf file huge as it contains many of such edited images.

 

So, is there a way to reduce the image size after editing by gimp or at lest keep the old size.

 

best

Stephani

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...