You are currently browsing the archives for the Linux category


Tidy up your XML

When I’m doing web services development I get frustrated trying to read through a gob of XML data trying to find the data I’m looking for.

I just came across a way to make life way easier last night with the simple “tidy” program.

Simply pipe your unformatted XML through this command, and out will come nicely indented and easy to read XML.

tidy -i -xml -utf8

Job control in Linux – the "disown" command

I’m currently running a large backup on my home computer. Basically all of my photos and music, as well as some other stuff. I have a tar command running that’s using bzip2 to compress everything onto a portable hard drive.

I had ssh’d into my computer last night to run the command, and left it running all night. I was hoping when I got up this morning it would be finished, but lo and behold, it isn’t. Now I know that if I exit the ssh login session, all of my active jobs will be killed.

Fortunately I found a solution, the “disown” command. If you run “disown” in a terminal, all of your jobs are released, and you can safely log out, and they’ll keep running. To be able to do this you have to background the current process. I did that by hitting “Ctrl+Z” to stop the process, and then “bg” to send it to the background.

What if I want to reclaim my job? Honestly, I have no idea. That’s for another day!