Sunday, September 19, 2010

Linux Tip: Splitting and Merging multiple files

Ever so often, when you download large files from internet, you find the file being split into smaller parts. It's easier to upload this way and most file upload sites - rapidshare, hotfile etc. have a max file size limit.

There are many ways to merge these files. Let me show you two popular ways

a) Using cat to merge
cat file.1 file.2 file.3 > file

$ cat sitcom.avi.part1 sitcom.avi.part2 sitcom.avi.part3 > sitcom.avi

Using split to well, split
split [OPTION]... [INPUT [PREFIX]]
$ split -b 100M sitcom.avi sitcom.avi.

-b, stands for binary files

It's easy to write a shell script that takes in filename, chunk size, destination etc as parameters. But why not save the trouble and use the second alternative.

b) Using Gnome split

As the name suggests, you can merge, split files right from Gnome.

It also has some cool features like deleting the chunks after merge is completed etc.

Great. That was easy, wasn't it. I haven't found any KDE alternatives yet. Feel free to share them in the comments. Thanks.

How Apple sets Prices

I was psyched to see an article on Apple being featured in my favorite blog - NYTimes Freakonomics.

This article originally featured in Bloomberg Business Week
which breaks down Apple’s pricing strategy and identifies its key components. “Next time you’re sitting at an airport bar and hear two business people debate whether Apple is a technology or design company, chime in: ‘Nope. What Steve Jobs sells is pricing,’” writes Ben Kunz. “Pricing? You bet. Jobs is a master of using pricing decoys, reference prices, bundling and obscurity to make you think his shiny aluminum toys are a good deal.”"

A Fresh new start

I started writing this blog back in my undergraduate years at the National University of Singapore. I was then single, bored and jobless (perks of a scholarship stipend). And really passionate about technology, the Web and the OpenSource movement.

Life's changed a lot since then. I am currently juggling a full time job and a part-time grad school program. I haven't done serious coding in months and I am already an iteration of Ubuntu behind. Lots to catch up. Let's go.