Monday, December 19, 2005

Split and Reassemble files [1]

here always comes a time, where you wish that file was only a few kilobytes/megabytes smaller. Wether it be so it can fit onto your floppy disk, CDR etc, or so you can meet the attachment limit on an e-mail server. This isn't really a command that you would use everyday, but it might come in handy.
Splitting the file (split)
Now, for this example I will use the file hello.mp3 which is more than 10M

The command that we will use is $ split -b 2048k hello.mp3

$ split -b 2048k hello.mp3
a list of files will be generated
OK, what we have now done is told 'split' to use bytes per output file (-b). For more information and arguments on split, view the man pages (man split).
These files now meet the e-mail server's attachment limit and can be sent.


Post a Comment

<< Home