Split huge files in Ubuntu or any other Linux distro

Recently I’ve bought WD TV media player for streaming full HD movies (primarily in 1080p resolution) to my home TV from external storage like usb HDD or ipod classic. You might already know that size of average HD movie rip is more than 4GB (e.g. full HD Avatar movie image is literally 21 GB mkv file) so it’s just impossible to store such huge files on any FAT32 formatted HDD or ipod. My ipod classic 160 GB is windows formatted so it uses FAT32 filesystem where maximum file size is 4 GB. As far as ipod cannot be formatted into ext3 but still be able to play music (just sweet dreams) I have to split huge files to 3.99GB parts and store them to my ipod for later reassemble. When it’s time to watch the some HD movie stored at ipod it’s required to assemble those 3.99 GB parts into one solid file, transfer it to media player and then actually watch the movie.

Rather long preface but solution is quite simple. If u run Ubuntu you can try lxsplit utility for breaking files into parts (binary packages for other Linux distributions as well as source code are available at lxsplit project’s homepage.):

sudo apt-get install lxsplit

In order to split some file in 3.99GB parts use the following command:

lxsplit -s /path/to/hugemoviefile.mkv 3999M

Depending on size of hugemoviefile.mkv you will get several parts hugemoviefile.mkv.001, hugemoviefile.mkv.002 and so on stored in current directory. It means that if you’re going to store those parts on some external storage like ipod you can do the following:

cd /media/ipod/
lxsplit -s /path/to/hugemoviefile.mkv 3999M

and hugemoviefile.mkv.001.. will saved in /media/ipod/ directory regardless where hugemoviefile.mkv is located.

Now coming to assembling procedure. It’s just as easy as splitting:

lxsplit -j hugemoviefile.mkv.001

Once done you will get hugemoviefile.mkv saved in current directory.

Have an interesting article? You’re welcome to contact me and get it published at LinuxScrew.com!

 
 
» You might also be interested in the following articles:
The easiest way to split and merge pdf files in Ubuntu
Tiny perl script for UDP flooding
Lingvo dictionaries with Stardict
Sexy backgrounds for Ubuntu Linux. Part 2
Christmas… Linux… Wallpapers…



» Want to stay up to date? Subscribe to our E-MAIL or RSS feed!

5 Responses to “Split huge files in Ubuntu or any other Linux distro”


  1. 1 Bhaskar Chowdhury

    Hi,

    I think most of the GNU/Linux distro come with a “split” binary which essentially done the same thing.

    Cheers!

  2. 2 poo

    heey Ive just found some cool vid that is about downloading check it out: http://www.youtube.com/watch?v=W6CFFkp79o0

  3. 3 James

    You have a very nice website layout, I like it! Please post more content, because I am excited to see what you post next. I bookmarked you blog. Thank you!

  4. 4 Juan

    I think its a really nice post, i like Linux I would add to favs greets Juan

  5. 5 nomnex

    GUI alternative to lxsplit:

    If you have Java, go there http://www.freebyte.com/hjsplit/#java

    right-click the .jar and select open with java

    et voila!

Leave a Reply




Friendly Sites:Who is behind Linux Screw?
GeekyBits³ | Bash Cures Cancer | OMG! Ubuntu!
My SysAd Blog | Web Upd8
ZEPY | Linux config Wiki | Planet Sysadmin
a non-geek's linux notes | Linux Today
Linux HOWTOs, Tutorials & Projects with Adam Palmer | LinuxAlt.Com
My name is Artem N. (artiomix AT gmail DOT com) and I'm Linux/Unix, Cisco systems engineer. The main idea of Linux Screw is to share relevant knowledge, skills and observations over The Web. Here you can find a lot of information related to different Linux distributions, FreeBSD, IOS as well as a other Open Source around staff. Read more ››