A journal to record my notes and ideas related to software development and computing

Monday, June 30, 2008

Splitting up large files

This is one of those things that I need to do occasionally, but not often enough that I've been able to commit it to memory.

split -b 4000m large_file large_file.

This will split a the large_file file into 4Gb files with filenames large_file.aa, large_file.ab, etc. Before doing this, it really helps to make sure you've got enough space for the new files - ie, at least as much free space as the file you are splitting!

To get the parts back together:

cat large_file.* > large_file

Tuesday, June 17, 2008

Solving The Tangled Working Copy Problem

I just read this article, which goes into great (as in good) detail about one way to solve the problem where you have more than one conceptual change in your work-space, and you want to physically separate them into different groups.

When I've encountered this problem previously, I've generally just backed up the working copy, reverted the unwanted changes in the working copy, submitted it, then pulled back the additional changes form the backup. But the way described in the article is a much better way!

Apparently it is supported in Mercurial, so I'll have to give it a go next time. Unfortunately, it doesn't help when I'm working with Subversion, as is currently the case at work. However, the article also mentions a way of do a similar thing using the patch program, which is still better than my manual way around it.

About Me

Computer programmer with and interest in music, and a passion for brewing beer, which I'm working at developing into a career!