Saturday, February 26, 2011

Live USB



Jaya Srila Prabhupada

Making a live USB stick is simple. Make sure that the USB stick is not mounted before trying this.

dd_rescue /path/to/image.iso /dev/sdX

where /dev/sdX is the actual device. It can be known in openSUSE by running the following command:

ls -l /dev/disk/by-id/*usb*

PS: Unfortunately this method is specific for openSUSE and may not work when creating a USB installer for other distros. Each distro has its own way of creating a USB installer.

Jaya Sathguru Bhagwan Sridhara swamy maharaj.

Saturday, February 19, 2011

Irrational Numbers - another display of Krishna's genius



Jai Srila Prabhupada

Recently something had spurred in me a lot of interest for Math. I came across the concept of irrational numbers. You can create an irrational number in a number of ways. One of which I know is by taking the square-root of a number. There is also a ready to use irrational number - the pi.

Thinking of the pi made me appreciate the creative genius of Lord Krishna. The definition of the pi is: The number that you get when you divide the circumference of a circle by its radius. Fascinating isn't it? Just think of it. Draw a circle. Find its circumference. Then divide it by the circle's radius. And lo; you get a number that's having infinite digits with no repetition. That means you just can't express the pi using pen and paper like you do for other (rational) numbers. What special property that the circumference of a circle has that gives this special number - the pi - the irrational nature? We can only appreciate the genius of Krishna whenever we look at the pi.

Jaya Sathguru Bhagwan Sridhara swamy maharaja.

Saturday, February 12, 2011

Shortcut Keys in Evince



Jai Srila Prabhupada

I found two undocumented shortcut keys in Evince. To expand a node in the page index pane (on the left of the reading pane), highlight the node and press space bar. To collapse the node, press the '/' key in the number pad section of the keyboard.

Jai Sathguru Bhagwan Sridhara Swamy Maharaja.

Saturday, February 5, 2011

finding disk usage using 'grep' and 'du'



Jai Srila Prabhupada.

Today I was trying to find how much disk storage space was being used by files on my system. I used the following command to find disk storage space used:
du -hc / > usage_details.txt
Now I needed to analyze the information captured in the text file that got created in the above step. During my analysis, I did find that knowing the disk usage for a particular folder was easy, as the 'du' tool captures the disk usage folder-wise when used with the -c option as shown above. But, now I wanted to find the disk usage only for the top level folders i.e. /home, /tmp, /var, /usr etc. I resorted to using the 'grep' command in the following way:
grep -v "\/.*\/.*" usage_details.txt
The text within quotes is a back-slash, forward-slash, period, asterix and again the same set of characters. Here 'grep' is called with the -v option which means negation of the match condition - if the text read by 'grep' doesn't match the pattern, then print it to the standard output. That was a pretty nifty feature, eh!

Jai Sathguru Bhagavan Sridhara swamy maharaj.