Linux and MR systems

I recently installed the Ubuntu (Linux) operating system on my home PC. My aim is to see how well I can get by with free software for all my home-use activities, which include website development, internet browsing, word processing, finance management, music, email and more. (Ubuntu automatically detected all my hardware, including wireless, bluetooth, printers, and “Fn” keys, and sucessfully repartitioned my hard drive to dual-boot with Windows Vista—very nifty. But I digress.) In the course of my dabbling in Linux, I have found myself more well prepared for performing research-related activities on one manufacturer’s MR scanner, which also runs on Linux.

Most of my computing knowledge comes from a history of Microsoft Windows use. Like most people, I would have preferred an environment familiar to me. But though command-line use can be daunting at first, the power of the Linux command window (or shell) is formidable, especially for researchers and scientists. You can get Linux to run scripts in any of the many languages it already understands (think of post-processing your acquired images, or your raw k-space data for research purposes). Want a secure connection for remote access to the scanner host PC? No problem, use ssh. Want a screenshot? ImageMagick comes pre-installed (and GIMP, incidentally). This and all the usual powerful commands included in Linux such as diff and grep.

For example, the other day I wanted to look through the whole MR host system for PDF files. I also wanted to see if they would fit onto a USB stick. So my command needed to be:

Look through the whole system for filenames ending ‘.pdf’, but don’t look in other mounted drives or network locations, then estimate the disk usage of those files, then sort the results into a list, by files sizes, biggest first, and send that to a file on my USB stick. Please.

I cobbled together this single line command (it is wrapped onto two lines here), which worked a treat:

find / -mount -name '*.pdf' -exec du {} \; | sort -nr -o /path/to/usb/pdf_files.txt

No doubt such commands are possible with Windows too, but my point is this: the flexibility and utility of Linux for research use is very apparent, and best of all, easy to learn.

The same goes for web hosting; most websites in the world are running on Apache servers, which run on Linux machines.