I cut and rendered a video which turned out to be several gigabytes in size. When it came to taking the video to a friend, Linux came in very handy to solve file system limits.
Funny as it may sound, even in a Linux-based Android phone, the SD card has to be used with a Fat32 filesystem. This filesystem cannot handle files larger than 4 gigabytes due to its 32bit design. So when copying the video file to my phone’s SD card (which was the only “disc” I wanted to take with me), after what seemed like a decade, the thing said
cp: writing `/mnt/large_video_file.avi’: File too large
cp: failed to extend `/mnt/large_video_file.avi’: File too large
Well, there’s a solution to (almost) every technical problem and I found this one so delightfully pleasant, even if documented in many sources, that I felt like sharing. It’s as simple as executing
split -C 1G large_video_file.avi
to split the large file into smaller 1 gigabyte files, which could then be copied to the fat32 device. By default, these files are named xaa, xab, xac and so on, but you can also set a custom prefix.
After getting them back from the device on the target machine, it’s just a matter of
cat xaa xab xac > large_video_file.avi
to get the large file back to one piece.
Beatiful, isn’t it?