How to uncompress tar.bz2 files in the command line 1

Posted by Sheldon Finlay on May 28, 2009

I confess that I can never remember the syntax for this myself. I know there is a j and an x flag in there somewhere. So I’m adding this for myself as much as for everyone else who can’t keep this syntax straight.

  tar -jxvf filename.tar.bz2

Batch Rename of File Extension in Linux

Posted by Sheldon Finlay on January 28, 2009

Sometimes you have a bunch of .html files which you need to rename .php for a project. You could rename them one at a time, but that gets a little old after about 5 files. This little shell script will rename the extension on a whole directory of files:

for f in *.html; do mv $f `basename $f .htm`.php; done;

Determine the processor in linux

Posted by Sheldon Finlay on January 23, 2009

Here’s a quickie on how to determine the process specs in linux. I am always forgetting the command so this is as much for me as it is for others:

cat /proc/cpuinfo