<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.digitalinternals.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:thr="http://purl.org/syndication/thread/1.0" xml:lang="en" xml:base="http://www.digitalinternals.com/wp-atom.php">
	<title type="text">Digital Internals</title>
	<subtitle type="text">Technology Deciphered</subtitle>

	<updated>2010-02-28T07:54:58Z</updated>
	<generator uri="http://wordpress.org/" version="2.8.4">WordPress</generator>

	<link rel="alternate" type="text/html" href="http://www.digitalinternals.com" />
	<id>http://www.digitalinternals.com/feed/atom/</id>
	

			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.digitalinternals.com/digitalinternals" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="digitalinternals" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">digitalinternals</feedburner:emailServiceId><feedburner:feedburnerHostname xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">http://feedburner.google.com</feedburner:feedburnerHostname><entry>
		<author>
			<name>ibrahim</name>
					</author>
		<title type="html"><![CDATA[How to Confirm That Someone Has Blocked You on Facebook]]></title>
		<link rel="alternate" type="text/html" href="http://www.digitalinternals.com/140/20100228/how-to-confirm-that-someone-has-blocked-you-on-facebook/" />
		<id>http://www.digitalinternals.com/?p=140</id>
		<updated>2010-02-28T07:54:58Z</updated>
		<published>2010-02-28T07:54:58Z</published>
		<category scheme="http://www.digitalinternals.com" term="Uncategorized" /><category scheme="http://www.digitalinternals.com" term="account" /><category scheme="http://www.digitalinternals.com" term="block" /><category scheme="http://www.digitalinternals.com" term="facebook" /><category scheme="http://www.digitalinternals.com" term="privacy" /><category scheme="http://www.digitalinternals.com" term="social networking" />		<summary type="html"><![CDATA[If you are not aware yet, every Facebook account has a privacy option to block users based on their name or e-mail address. Once you block someone, you cut all ties with them, including friendship, comments, etc. They will not be able to interact with you nor be able to search for you on Facebook.

Before [...]]]></summary>
		<content type="html" xml:base="http://www.digitalinternals.com/140/20100228/how-to-confirm-that-someone-has-blocked-you-on-facebook/">&lt;p&gt;If you are not aware yet, every Facebook account has a privacy option to block users based on their name or e-mail address. Once you block someone, you cut all ties with them, including friendship, comments, etc. They will not be able to interact with you nor be able to search for you on Facebook.&lt;/p&gt;
&lt;p&gt;&lt;span id="more-140"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Before trying to confirm if someone has blocked you on Facebook, let&amp;#8217;s see how to block someone in Facebook.&lt;/p&gt;
&lt;h5&gt;Blocking Someone on Facebook&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;Logon to Facebook and goto &amp;#8216;Block List&amp;#8217; under &amp;#8216;Privacy Settings&amp;#8217;&lt;/li&gt;
&lt;li&gt;Search for the user to block based on the name or e-mail address&lt; and click on the 'Block' link for the person you want to block/li&gt;
&lt;/ul&gt;
&lt;h5&gt;Confirm If Someone Has Blocked You on Facebook&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;Create another Facebook account using a new e-mail address&lt;/li&gt;
&lt;li&gt;Search for the user you believe has blocked you using his/her name or e-mail address&lt;/li&gt;
&lt;li&gt;If that person&amp;#8217;s Facebook profile appears in the search result, they have most probably added you to their block list&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If your search result does not return any result,the account could have been deactivated or the associated e-mail address could have been changed.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/NoSQta_4f6sZIo_Il4ENcsKRPZg/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/NoSQta_4f6sZIo_Il4ENcsKRPZg/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/NoSQta_4f6sZIo_Il4ENcsKRPZg/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/NoSQta_4f6sZIo_Il4ENcsKRPZg/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content>
		<link rel="replies" type="text/html" href="http://www.digitalinternals.com/140/20100228/how-to-confirm-that-someone-has-blocked-you-on-facebook/#comments" thr:count="0" />
		<link rel="replies" type="application/atom+xml" href="http://www.digitalinternals.com/140/20100228/how-to-confirm-that-someone-has-blocked-you-on-facebook/feed/atom/" thr:count="0" />
		<thr:total>0</thr:total>
	</entry>
		<entry>
		<author>
			<name>ibrahim</name>
					</author>
		<title type="html"><![CDATA[How to Redirect Output of Command Line Tools to Windows Clipboard]]></title>
		<link rel="alternate" type="text/html" href="http://www.digitalinternals.com/139/20100117/how-to-redirect-output-of-command-line-tools-to-windows-clipboard/" />
		<id>http://www.digitalinternals.com/?p=139</id>
		<updated>2010-01-17T12:53:08Z</updated>
		<published>2010-01-17T12:53:08Z</published>
		<category scheme="http://www.digitalinternals.com" term="Uncategorized" /><category scheme="http://www.digitalinternals.com" term="cli" /><category scheme="http://www.digitalinternals.com" term="clip" /><category scheme="http://www.digitalinternals.com" term="vista" /><category scheme="http://www.digitalinternals.com" term="windows" />		<summary type="html"><![CDATA[I have recently discovered a new Windows command line tool, called 'clip' that can be used to redirect the output of CLI tools to the Windows Clipboard.

This command is available in Windows Vista but not found in Windows XP. It&#8217;s found in the %systemroot%\system32 directory.
To copy the output of a CLI tool to the Windows [...]]]></summary>
		<content type="html" xml:base="http://www.digitalinternals.com/139/20100117/how-to-redirect-output-of-command-line-tools-to-windows-clipboard/">&lt;p&gt;I have recently discovered a new Windows command line tool, called &lt;code&gt;'clip'&lt;/code&gt; that can be used to redirect the output of CLI tools to the Windows Clipboard.&lt;/p&gt;
&lt;p&gt;&lt;span id="more-139"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;This command is available in Windows Vista but not found in Windows XP. It&amp;#8217;s found in the &lt;span class="darkblue"&gt;%systemroot%\system32&lt;/span&gt; directory.&lt;/p&gt;
&lt;p&gt;To copy the output of a CLI tool to the Windows Clipboard, append &lt;span class="red"&gt;&amp;#8216;| clip&amp;#8217;&lt;/span&gt; to the end of the command. To retrieve the output, open Notepad or a text editor and click on &amp;#8216;Paste&amp;#8217;.&lt;/p&gt;
&lt;p&gt;Clip can also be used with input redirection operator &amp;#8211; &lt;span class="red"&gt;&amp;#8216;&amp;lt;&amp;#8217;&lt;/span&gt;. To perform the redirection, prepend &lt;span class="red"&gt;clip &amp;lt;&lt;/span&gt; to the command.&lt;/p&gt;
&lt;p&gt;Below are some examples on how the program can be called.&lt;/p&gt;
&lt;pre&gt;
C:\temp&gt; type readmet.txt | clip
&lt;/pre&gt;
&lt;pre&gt;
C:\temp&gt; clip &lt; readme.txt
&lt;/pre&gt;
&lt;p&gt;I am not sure if such a tool is available in UNIX or Linux. But this feature can be easily emulated by redirecting the output to a file and opening the file in VI or a text editor.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/L8l81p08lRmDXz8QQ_PsczZyqIY/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/L8l81p08lRmDXz8QQ_PsczZyqIY/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/L8l81p08lRmDXz8QQ_PsczZyqIY/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/L8l81p08lRmDXz8QQ_PsczZyqIY/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content>
		<link rel="replies" type="text/html" href="http://www.digitalinternals.com/139/20100117/how-to-redirect-output-of-command-line-tools-to-windows-clipboard/#comments" thr:count="0" />
		<link rel="replies" type="application/atom+xml" href="http://www.digitalinternals.com/139/20100117/how-to-redirect-output-of-command-line-tools-to-windows-clipboard/feed/atom/" thr:count="0" />
		<thr:total>0</thr:total>
	</entry>
		<entry>
		<author>
			<name>ibrahim</name>
					</author>
		<title type="html"><![CDATA[How to Prevent Ubuntu from Setting BIOS Clock to UTC]]></title>
		<link rel="alternate" type="text/html" href="http://www.digitalinternals.com/138/20091122/how-to-prevent-ubuntu-from-setting-bios-clock-to-utc/" />
		<id>http://www.digitalinternals.com/?p=138</id>
		<updated>2009-11-22T15:06:15Z</updated>
		<published>2009-11-22T15:05:42Z</published>
		<category scheme="http://www.digitalinternals.com" term="Uncategorized" /><category scheme="http://www.digitalinternals.com" term="bios" /><category scheme="http://www.digitalinternals.com" term="clock" /><category scheme="http://www.digitalinternals.com" term="linux" /><category scheme="http://www.digitalinternals.com" term="ubuntu" />		<summary type="html"><![CDATA[I have a dual-boot computer that boots Ubuntu and Windows 7. Whenever I boot into Ubuntu, the BIOS clock is automatically set to UTC time, even though my current timezone is UTC+8.

Microsoft Windows on other hand, assumes that the BIOS clock contains the local time. I am not sure if there&#8217;s a way to make [...]]]></summary>
		<content type="html" xml:base="http://www.digitalinternals.com/138/20091122/how-to-prevent-ubuntu-from-setting-bios-clock-to-utc/">&lt;p&gt;I have a dual-boot computer that boots Ubuntu and Windows 7. Whenever I boot into Ubuntu, the BIOS clock is automatically set to UTC time, even though my current timezone is UTC+8.&lt;/p&gt;
&lt;p&gt;&lt;span id="more-138"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Microsoft Windows on other hand, assumes that the BIOS clock contains the local time. I am not sure if there&amp;#8217;s a way to make Windows assume that the BIOS time is set to UTC, but I have found a way to stop Ubuntu from setting the BIOS clock to UTC.&lt;/p&gt;
&lt;p&gt;Ubuntu has a variable settings file called &lt;strong&gt;rcS&lt;/strong&gt; in the /etc/default directory. This file contains variables that affect the behaviour of startup scripts. One of the variables is the &amp;#8216;UTC&amp;#8217; paramater. This parameter is used to govern how the BIOS or hardware clock is intepreted. If it&amp;#8217;s set to &amp;#8216;no&amp;#8217; then the system clock is assumed to be set to local time. If it&amp;#8217;s set to &amp;#8216;yes&amp;#8217; then it&amp;#8217;s assumed to be set to UTC time.&lt;/p&gt;
&lt;p&gt;To let Ubuntu interpret the system clock as local time, the &amp;#8216;UTC&amp;#8217; parameter has to be set to &amp;#8216;no&amp;#8217;. To update the parameter in the file, run the following command in a terminal.&lt;/p&gt;
&lt;pre class="brush: bash; light: true;"&gt;
ibrahim@anfield:~$ sudo bash
[sudo] password for ibrahim:
root@trafford:~# sed 's/UTC=yes/UTC=no/' /etc/default/rcS &amp;gt; /tmp/rcS
root@trafford:~# mv -f /tmp/rcS /etc/default/rcS
&lt;/pre&gt;
&lt;p&gt;To update the BIOS time to localtime, run hwclock as follows:&lt;/p&gt;
&lt;pre class="brush: bash; light: true;"&gt;
root@trafford:~# hwclock --systohc --localtime
&lt;/pre&gt;

&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/rOdaCgoag-IClGM2BoN-ie8CeTw/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/rOdaCgoag-IClGM2BoN-ie8CeTw/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/rOdaCgoag-IClGM2BoN-ie8CeTw/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/rOdaCgoag-IClGM2BoN-ie8CeTw/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content>
		<link rel="replies" type="text/html" href="http://www.digitalinternals.com/138/20091122/how-to-prevent-ubuntu-from-setting-bios-clock-to-utc/#comments" thr:count="0" />
		<link rel="replies" type="application/atom+xml" href="http://www.digitalinternals.com/138/20091122/how-to-prevent-ubuntu-from-setting-bios-clock-to-utc/feed/atom/" thr:count="0" />
		<thr:total>0</thr:total>
	</entry>
		<entry>
		<author>
			<name>ibrahim</name>
					</author>
		<title type="html"><![CDATA[How to Initiate Google Talk Group Chat in Pidgin]]></title>
		<link rel="alternate" type="text/html" href="http://www.digitalinternals.com/137/20091031/how-to-initiate-google-talk-group-chat-in-pidgin/" />
		<id>http://www.digitalinternals.com/?p=137</id>
		<updated>2009-10-31T14:08:50Z</updated>
		<published>2009-10-31T14:03:48Z</published>
		<category scheme="http://www.digitalinternals.com" term="Uncategorized" /><category scheme="http://www.digitalinternals.com" term="google talk" /><category scheme="http://www.digitalinternals.com" term="group chat" /><category scheme="http://www.digitalinternals.com" term="gtalk" /><category scheme="http://www.digitalinternals.com" term="pidgin" />		<summary type="html"><![CDATA[Google has launched a new Group Chat feature in Google Talk. Even though Google Talk uses the open XML based XMPP protocol for it&#8217;s IM service, Pidgin, the open source multi-platform instant messaging client, has yet to support this useful feature.

I have absolutely no clue as to why this feature is not included in Pidgin. [...]]]></summary>
		<content type="html" xml:base="http://www.digitalinternals.com/137/20091031/how-to-initiate-google-talk-group-chat-in-pidgin/">&lt;p&gt;Google has launched a new Group Chat feature in Google Talk. Even though Google Talk uses the open XML based XMPP protocol for it&amp;#8217;s IM service, &lt;a href="http://pidgin.im/"&gt;Pidgin&lt;/a&gt;, the open source multi-platform instant messaging client, has yet to support this useful feature.&lt;/p&gt;
&lt;p&gt;&lt;span id="more-137"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;I have absolutely no clue as to why this feature is not included in Pidgin. I have some of my colleagues on Google Talk and group chat is sometimes a necessary tool to get quick updates from colleagues working from different locations.&lt;/p&gt;
&lt;p&gt;As Google Talk is based on a XML protocol, I decided to find out how a group chat is being initiated using &lt;a href="http://www.wireshark.org/"&gt;Wireshark&lt;/a&gt;, a free packet sniffer cum analyzer.&lt;/p&gt;
&lt;p&gt;Below is a snippet of a group chat request being sent from the official Google Talk client. Note the string: &lt;span class="forestgreen"&gt;private-chat-11d12d21-46e5-4359-b0cd-44bc01bb82af@groupchat.google.com&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="http://i.digitalinternals.com/2009/10/137/wireshark-gtgc.gif" alt="wireshark google talk group chat xml" /&gt;&lt;/p&gt;
&lt;p&gt;The numbers in the string &lt;span class="forestgreen"&gt;private-chat-11d12d21-46e5-4359-b0cd-44bc01bb82af@groupchat.google.com&lt;/span&gt; looks like a &lt;a href="http://en.wikipedia.org/wiki/Uuid"&gt;UUID&lt;/a&gt; number to me. We now have the necessary info to initiate a Google Talk group chat in Pidgin. Click on &amp;#8216;Join a chat&amp;#8217; from the Buddies menu in Pidgin. You will get a pop-up window similar to the one below.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://i.digitalinternals.com/2009/10/137/pidgin-chat.gif" alt="pidgin google talk group chat" /&gt;&lt;/p&gt;
&lt;p&gt;Enter the following fields:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Room &amp;#8211; private-chat-11d12d21-46e5-4359-b0cd-44bc01bb82af&lt;/li&gt;
&lt;li&gt;Server &amp;#8211; groupchat.google.com&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;and click the Join button. You should now have a group chat window opened in Pidgin. You can now start inviting your contacts for a Google Talk group chat on Pidgin.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/O_zPMb7wgA7XAvkxr_VG042WjGE/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/O_zPMb7wgA7XAvkxr_VG042WjGE/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/O_zPMb7wgA7XAvkxr_VG042WjGE/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/O_zPMb7wgA7XAvkxr_VG042WjGE/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content>
		<link rel="replies" type="text/html" href="http://www.digitalinternals.com/137/20091031/how-to-initiate-google-talk-group-chat-in-pidgin/#comments" thr:count="1" />
		<link rel="replies" type="application/atom+xml" href="http://www.digitalinternals.com/137/20091031/how-to-initiate-google-talk-group-chat-in-pidgin/feed/atom/" thr:count="1" />
		<thr:total>1</thr:total>
	</entry>
		<entry>
		<author>
			<name>ibrahim</name>
					</author>
		<title type="html"><![CDATA[UNIX Shell Script to Calculate Tomorrow’s Date]]></title>
		<link rel="alternate" type="text/html" href="http://www.digitalinternals.com/136/20091007/unix-shell-script-calculate-tomorrow-date/" />
		<id>http://www.digitalinternals.com/?p=136</id>
		<updated>2009-10-11T12:09:20Z</updated>
		<published>2009-10-07T13:43:30Z</published>
		<category scheme="http://www.digitalinternals.com" term="Uncategorized" /><category scheme="http://www.digitalinternals.com" term="date" /><category scheme="http://www.digitalinternals.com" term="linux" /><category scheme="http://www.digitalinternals.com" term="shell-script" /><category scheme="http://www.digitalinternals.com" term="tomorrow" /><category scheme="http://www.digitalinternals.com" term="unix" />		<summary type="html"><![CDATA[A couple of readers, upon reading this article to calculate yesterday&#8217;s date in a shell script, have requested for a similar script that can be used to calculate tomorrow&#8217;s date.

Even though such a script is quite straight forward to write, many people seem to be have problem with the leap year calculations. Anway, I have [...]]]></summary>
		<content type="html" xml:base="http://www.digitalinternals.com/136/20091007/unix-shell-script-calculate-tomorrow-date/">&lt;p&gt;A couple of readers, upon reading &lt;a href="http://www.digitalinternals.com/131/20090705/calculate-yesterday-date-in-unix-shell-script/"&gt;this&lt;/a&gt; article to calculate yesterday&amp;#8217;s date in a shell script, have requested for a similar script that can be used to calculate tomorrow&amp;#8217;s date.&lt;/p&gt;
&lt;p&gt;&lt;span id="more-136"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Even though such a script is quite straight forward to write, many people seem to be have problem with the leap year calculations. Anway, I have managed to come up with a script to help everyone. Read on.&lt;/p&gt;
&lt;p&gt;If you are running Linux, it&amp;#8217;s highly likely that you have a GNU version of the &lt;strong&gt;date&lt;/strong&gt; command installed. With GNU date, you can get tomorrow&amp;#8217;s date quite easily (without the help of any shell script) by running it as follows:&lt;/p&gt;
&lt;pre&gt;
[ibrahim@anfield ~]$ date  -d "+1 day"
Thu Oct  8 06:26:25 PDT 2009
&lt;/pre&gt;
&lt;p&gt;If you are running a commercial UNIX distribution instead of Linux, chances are that the date command will not support the &amp;#8216;-d&amp;#8217; option. The script below can be used on such platforms to calculate tomorrow&amp;#8217;s date instead. Save the following script to a file called &lt;strong&gt;tomorrow&lt;/strong&gt;, chmod to 755 and copy it to a directory in your PATH.&lt;/p&gt;
&lt;pre class="brush: bash;"&gt;
#!/bin/sh

#
# Script to calculate tomorrow's date with custom output date format
#
# Author: ibrahim - www.digitalinternals.com
#

  # default output format
  defaultof=&amp;quot;%Y%m%d&amp;quot;

  # check for input format, else use default format,
  # refer to 'man date' for help on format
  of=$defaultof
  [ $# -eq 1 ] &amp;amp;&amp;amp; of=&amp;quot;$1&amp;quot;

  # get today's date
  y=`date '+%Y'`
  m=`date '+%m'`
  d=`date '+%d'`

  #check for max number of days in current month
  days=31
  if [ $m -eq 4 ] || [ $m -eq 6 ] || [ $m -eq 9 ] || [ $m -eq 11 ] ; then
    days=30
  fi
  # check for leap year if feb
  if [ $m -eq 2 ]; then
    days=28
    leap1=`expr $y % 4`
    leap2=`expr $y % 100`
    leap3=`expr $y % 400`
    if [ $leap1 -eq 0 ] ; then
      if [ $leap2 -gt 0 ] || [ $leap3 -eq 0 ] ; then
        days=29
      fi
    fi
  fi

  # increment date
  if [ $d -eq $days ]; then
    d=1
    m=`expr $m + 1`
    if [ $m -eq 13 ]; then
      m=1
      y=`expr $y + 1`
    fi
  else
    d=`expr $d + 1`
  fi

  date -d &amp;quot;$y-$m-$d&amp;quot; +&amp;quot;$of&amp;quot;
&lt;/pre&gt;
&lt;p&gt;Below are some examples on how the script can be called.&lt;/p&gt;
&lt;pre&gt;
[ibrahim@anfield ~]$ date
Wed Oct  7 06:36:45 PDT 2009

[ibrahim@anfield ~]$ tomorrow
20091008

[ibrahim@anfield ~]$ tomorrow "%c"
Thu 08 Oct 2009 12:00:00 AM PDT

[ibrahim@anfield ~]$ tomorrow "%Y-%m-%d"
2009-10-08
&lt;/pre&gt;

&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/ggNEUo5RNt2C21ZvfRBPvhZb34k/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ggNEUo5RNt2C21ZvfRBPvhZb34k/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/ggNEUo5RNt2C21ZvfRBPvhZb34k/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ggNEUo5RNt2C21ZvfRBPvhZb34k/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content>
		<link rel="replies" type="text/html" href="http://www.digitalinternals.com/136/20091007/unix-shell-script-calculate-tomorrow-date/#comments" thr:count="2" />
		<link rel="replies" type="application/atom+xml" href="http://www.digitalinternals.com/136/20091007/unix-shell-script-calculate-tomorrow-date/feed/atom/" thr:count="2" />
		<thr:total>2</thr:total>
	</entry>
		<entry>
		<author>
			<name>ibrahim</name>
					</author>
		<title type="html"><![CDATA[How to Use Google Currency Converter]]></title>
		<link rel="alternate" type="text/html" href="http://www.digitalinternals.com/135/20090913/how-to-use-google-currency-converter/" />
		<id>http://www.digitalinternals.com/?p=135</id>
		<updated>2009-09-13T07:16:28Z</updated>
		<published>2009-09-13T07:16:28Z</published>
		<category scheme="http://www.digitalinternals.com" term="Uncategorized" /><category scheme="http://www.digitalinternals.com" term="converter" /><category scheme="http://www.digitalinternals.com" term="currency converter" /><category scheme="http://www.digitalinternals.com" term="google" /><category scheme="http://www.digitalinternals.com" term="google feature" /><category scheme="http://www.digitalinternals.com" term="search" />		<summary type="html"><![CDATA[Are you going on a holiday and need to find out exchange rate of your holiday destination? You will no longer need to search for a site that does currency conversions. Google is able to perform the currency conversion using a simple search query.

All you need to do is to perform a Google search using [...]]]></summary>
		<content type="html" xml:base="http://www.digitalinternals.com/135/20090913/how-to-use-google-currency-converter/">&lt;p&gt;Are you going on a holiday and need to find out exchange rate of your holiday destination? You will no longer need to search for a site that does currency conversions. Google is able to perform the currency conversion using a simple search query.&lt;/p&gt;
&lt;p&gt;&lt;span id="more-135"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;All you need to do is to perform a Google search using a special syntax, similar to: &lt;strong&gt;100 SGD in USD&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Google will interpret the query as what is 100 Singapore Dollars in American Dollars. The search will return the currency rate as shown below.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://i.digitalinternals.com/2009/09/135/google-cc.png" alt="google curreny converter" /&gt;&lt;/p&gt;
&lt;p&gt;Currency Conversion is one of the many special popular features of Google. At the time of writing, this handy feature is not available in both Yahoo! and Bing search engines.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/rbD0PthBMi_f7qT4T-oqwyzHKfI/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/rbD0PthBMi_f7qT4T-oqwyzHKfI/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/rbD0PthBMi_f7qT4T-oqwyzHKfI/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/rbD0PthBMi_f7qT4T-oqwyzHKfI/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content>
		<link rel="replies" type="text/html" href="http://www.digitalinternals.com/135/20090913/how-to-use-google-currency-converter/#comments" thr:count="0" />
		<link rel="replies" type="application/atom+xml" href="http://www.digitalinternals.com/135/20090913/how-to-use-google-currency-converter/feed/atom/" thr:count="0" />
		<thr:total>0</thr:total>
	</entry>
		<entry>
		<author>
			<name>ibrahim</name>
					</author>
		<title type="html"><![CDATA[Free Dynamic DNS with Custom Domain]]></title>
		<link rel="alternate" type="text/html" href="http://www.digitalinternals.com/134/20090823/free-dynamic-dns-with-custom-domain/" />
		<id>http://www.digitalinternals.com/?p=134</id>
		<updated>2009-08-25T19:22:35Z</updated>
		<published>2009-08-23T08:33:36Z</published>
		<category scheme="http://www.digitalinternals.com" term="Uncategorized" /><category scheme="http://www.digitalinternals.com" term="cname" /><category scheme="http://www.digitalinternals.com" term="custom domain" /><category scheme="http://www.digitalinternals.com" term="dns" /><category scheme="http://www.digitalinternals.com" term="dynamic dns" />		<summary type="html"><![CDATA[If you need to administer your home network remotely from office, you will either need to know the public IP address assigned by your ISP or use a service called dynamic DNS, that will map a DNS hostname to your IP address. Dynamic DNS is required as the public IP address assigned by your Internet [...]]]></summary>
		<content type="html" xml:base="http://www.digitalinternals.com/134/20090823/free-dynamic-dns-with-custom-domain/">&lt;p&gt;If you need to administer your home network remotely from office, you will either need to know the public IP address assigned by your ISP or use a service called dynamic DNS, that will map a DNS hostname to your IP address. Dynamic DNS is required as the public IP address assigned by your Internet Service Provider is never fixed for consumer broadband connections.&lt;/p&gt;
&lt;p&gt;&lt;span id="more-134"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Dynamic DNS works by running a client program on your home PC or router, that will update the dynamic DNS servers whenever there is a change in the client IP address. This works great, but using a hostname such as &lt;span class="red"&gt;foo.dyndns.org&lt;/span&gt; is not very pretty. I would rather use my own domain instead. Isn&amp;#8217;t &lt;span class="red"&gt;myhome.digitalinternals.com&lt;/span&gt; much better? But, to achieve this, you will need to allow the dynamic DNS service providers, such as &lt;a href="http://www.dyndns.com/"&gt;DynDNS&lt;/a&gt; to administer your domain records. This is quite an hassle as this is probably managed by your web host. Such services are also not free.&lt;/p&gt;
&lt;p&gt;To get around this problem, you will need a domain administrator or a webhost that allows you to add &lt;strong&gt;CNAME&lt;/strong&gt; entries. A CNAME record is essentially a domain alias of another, canonical domain name. To get this working:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Sign up for a dynamic DNS account and register for a free subdomain.&lt;img src="http://i.digitalinternals.com/2009/08/134/dyndns-addhost.png" alt="dynamic dns add host" /&gt;&lt;/li&gt;
&lt;li&gt;Configure the dynamic DNS client in your router or PC.&lt;img src="http://i.digitalinternals.com/2009/08/134/dyndns-client.png" alt="dynamic dns client router" /&gt;&lt;/li&gt;
&lt;li&gt;Login to your webhost or domain administrator control panel and add a CNAME entry pointing to the dynamic DNS hostname you configured in step 1. &lt;img src="http://i.digitalinternals.com/2009/08/134/dyndns-cname.png" alt="dynamic dns add cname" /&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;From this point onwards, any DNS lookups to &lt;span class="red"&gt;myhome.digitalinternals.com&lt;/span&gt; will point to &lt;span class="red"&gt;foo.dyndns.org&lt;/span&gt;, which in turn will return the dynamic IP address.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/AtoYQqwSSu5ETLu40HMEk5AB3fQ/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/AtoYQqwSSu5ETLu40HMEk5AB3fQ/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/AtoYQqwSSu5ETLu40HMEk5AB3fQ/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/AtoYQqwSSu5ETLu40HMEk5AB3fQ/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content>
		<link rel="replies" type="text/html" href="http://www.digitalinternals.com/134/20090823/free-dynamic-dns-with-custom-domain/#comments" thr:count="0" />
		<link rel="replies" type="application/atom+xml" href="http://www.digitalinternals.com/134/20090823/free-dynamic-dns-with-custom-domain/feed/atom/" thr:count="0" />
		<thr:total>0</thr:total>
	</entry>
		<entry>
		<author>
			<name>ibrahim</name>
					</author>
		<title type="html"><![CDATA[How to Intrepret Shadow Passwords in UNIX]]></title>
		<link rel="alternate" type="text/html" href="http://www.digitalinternals.com/133/20090801/how-to-intrepret-shadow-passwords-in-unix/" />
		<id>http://www.digitalinternals.com/?p=133</id>
		<updated>2009-08-01T10:13:18Z</updated>
		<published>2009-08-01T10:11:59Z</published>
		<category scheme="http://www.digitalinternals.com" term="Uncategorized" /><category scheme="http://www.digitalinternals.com" term="blowfish" /><category scheme="http://www.digitalinternals.com" term="crypt" /><category scheme="http://www.digitalinternals.com" term="des" /><category scheme="http://www.digitalinternals.com" term="hash" /><category scheme="http://www.digitalinternals.com" term="linux" /><category scheme="http://www.digitalinternals.com" term="md5" /><category scheme="http://www.digitalinternals.com" term="password" /><category scheme="http://www.digitalinternals.com" term="sha" /><category scheme="http://www.digitalinternals.com" term="shadow" /><category scheme="http://www.digitalinternals.com" term="unix" />		<summary type="html"><![CDATA[In modern UNIX and Linux systems, user passwords are encrypted and stored in the /etc/shadow file. On BSD systems, the passwords are kept in the /etc/master.passwd file. The encrypted password field in the file contains more than just the encrypted password, it contains additional information.

The shadow password file can only be read by a superuser [...]]]></summary>
		<content type="html" xml:base="http://www.digitalinternals.com/133/20090801/how-to-intrepret-shadow-passwords-in-unix/">&lt;p&gt;In modern UNIX and Linux systems, user passwords are encrypted and stored in the &lt;code&gt;/etc/shadow&lt;/code&gt; file. On BSD systems, the passwords are kept in the &lt;code&gt;/etc/master.passwd&lt;/code&gt; file. The encrypted password field in the file contains more than just the encrypted password, it contains additional information.&lt;/p&gt;
&lt;p&gt;&lt;span id="more-133"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;The shadow password file can only be read by a superuser or by root, therefore you will need to login as root before you can start exploring the file.&lt;/p&gt;
&lt;h5&gt;UNIX shadow password hashing&lt;/h5&gt;
&lt;p&gt;Before looking at the contents of the file, we need to have some basic understanding on how the passwords are hashed in UNIX.&lt;/p&gt;
&lt;p&gt;&lt;img class="alignleft" src="http://i.digitalinternals.com/2009/08/133/passwd_hash.png" alt="password hashing in unix" /&gt;&lt;/p&gt;
&lt;p&gt;To get the encrypted password, a password hashing algorithm is required. This algorithm is not fixed and varies between different UNIX systems. The password hashing algorithm used for one user could be different from the one used for another user even on the same UNIX system. Another required input is the salt used by the hashing algorithm to encrypt the password. Therefore the stored password field must also contain the hashing algorithm and the salt used for hashing the original password.&lt;/p&gt;
&lt;h5&gt;Contents of /etc/shadow file&lt;/h5&gt;
&lt;p&gt;The format of the shadow password file is the same as that of the /etc/passwd file: one line per user, ordered fields per line separated by colons (:). On my Ubuntu server VM running on Sun xVM VirtualBox, my shadow entry is stored as follows:&lt;/p&gt;
&lt;pre&gt;
root@anfield-vm:~# cat /etc/shadow | grep ibrahim
ibrahim:$1$hanhd/cF$3lzrzB14HceT7uc3oTmog1:14323:0:99999:7:::
root@anfield-vm:~#
&lt;/pre&gt;
&lt;p&gt;The encrypted password is stored in the second field &amp;#8211; &lt;strong&gt;$1$hanhd/cF$3lzrBC14HceT7uc3oTmog1&lt;/strong&gt;. As I mentioned earlier, this field contains additional information. If you notice, there are three &amp;#8216;$&amp;#8217; characters in the field.&lt;/p&gt;
&lt;p&gt;If the field begins with &lt;strong&gt;$digit$&lt;/strong&gt;, then the Modular Crypt Format is used. If the entry does not start with a $, but instead of a underscore (&amp;#8217;_'), then the DES Extended Format is used. If the field neither starts with &amp;#8216;$&amp;#8217; or &amp;#8216;_&amp;#8217;, then the Traditional Format is used.&lt;/p&gt;
&lt;h5&gt;Modular Crypt Format&lt;/h5&gt;
&lt;p&gt;As far as I know, this is the most popular format, and therefore we will only cover this format. Password fields starting with &lt;strong&gt;$digit$&lt;/strong&gt; belong to the Modular Crypt Format.&lt;/p&gt;
&lt;p&gt;The digit determines which algorithm is used in encryption:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;$1$ &amp;#8211; MD5&lt;/li&gt;
&lt;li&gt;$2$ or $2a$ &amp;#8211; Blowfish&lt;/li&gt;
&lt;li&gt;$5$ or $6$ &amp;#8211; SHA&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The second sub-field between the second and third &amp;#8216;$&amp;#8217; character is the salt used in the encryption. In our case the salt is &lt;strong&gt;hanhd/cF&lt;/strong&gt;. The sub-field after the third &amp;#8216;$&amp;#8217; is the actual hashed password field.&lt;/p&gt;
&lt;h5&gt;User Authentication&lt;/h5&gt;
&lt;p&gt;Once the password is hashed, it is almost impossible to retrieve the original password except by brute force attacks. The user is authenticated by hashing the entered password and comparing the string with the stored hashed password. If the strings match, the user is assumed to have entered the correct password.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Yce5QepkisRQ9BrWu4o3TgcTt4Q/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Yce5QepkisRQ9BrWu4o3TgcTt4Q/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Yce5QepkisRQ9BrWu4o3TgcTt4Q/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Yce5QepkisRQ9BrWu4o3TgcTt4Q/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content>
		<link rel="replies" type="text/html" href="http://www.digitalinternals.com/133/20090801/how-to-intrepret-shadow-passwords-in-unix/#comments" thr:count="0" />
		<link rel="replies" type="application/atom+xml" href="http://www.digitalinternals.com/133/20090801/how-to-intrepret-shadow-passwords-in-unix/feed/atom/" thr:count="0" />
		<thr:total>0</thr:total>
	</entry>
		<entry>
		<author>
			<name>ibrahim</name>
					</author>
		<title type="html"><![CDATA[How to Determine the Linux Distribution]]></title>
		<link rel="alternate" type="text/html" href="http://www.digitalinternals.com/132/20090719/how-to-determine-the-linux-distribution/" />
		<id>http://www.digitalinternals.com/?p=132</id>
		<updated>2009-07-19T07:32:52Z</updated>
		<published>2009-07-18T16:51:49Z</published>
		<category scheme="http://www.digitalinternals.com" term="Uncategorized" /><category scheme="http://www.digitalinternals.com" term="distribution" /><category scheme="http://www.digitalinternals.com" term="linux" />		<summary type="html"><![CDATA[Linux is a very customisable UNIX like operating system. To date, there are more than a couple of dozen Linux distributions available, based on  this Wikipedia list.

To determine the Linux distribution you are running, there are usually a few files you can look for.If there&#8217;s a /etc/redhat-release file found in your Linux distribution, it&#8217;s [...]]]></summary>
		<content type="html" xml:base="http://www.digitalinternals.com/132/20090719/how-to-determine-the-linux-distribution/">&lt;p&gt;Linux is a very customisable UNIX like operating system. To date, there are more than a couple of dozen Linux distributions available, based on  &lt;a href="http://en.wikipedia.org/wiki/List_of_Linux_distributions"&gt;this&lt;/a&gt; Wikipedia list.&lt;/p&gt;
&lt;p&gt;&lt;span id="more-132"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;To determine the Linux distribution you are running, there are usually a few files you can look for.If there&amp;#8217;s a &lt;strong&gt;/etc/redhat-release&lt;/strong&gt; file found in your Linux distribution, it&amp;#8217;s possibly from RedHat. Likewise, you can find a &lt;strong&gt;/etc/SuSE-release&lt;/strong&gt; file in SUSE Linux distributions.&lt;/p&gt;
&lt;p&gt;Determining the Linux distribution from such distribution specific files is not really a good idea. There&amp;#8217;s got to be a better way, don&amp;#8217;t you think? Thanks to Linux Standard Base (LSB) &amp;#8211; a joint project by a number of Linux vendors to standardize the OS, there is a much easier way to determine the Linux distribution.&lt;/p&gt;
&lt;p&gt;Most of the popular Linux distributions such as Fedora, Ubuntu and Debian are now LSB compatible. To determine the Linux distribution, you can use the &lt;strong&gt;lsb_release&lt;/strong&gt; command.&lt;/p&gt;
&lt;pre&gt;
ibrahim@anfield:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 4.0 (etch)
Release:        4.0
Codename:       etch
&lt;/pre&gt;

&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/DNakLxuGrngdjtKg7vCqv5MfmBk/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/DNakLxuGrngdjtKg7vCqv5MfmBk/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/DNakLxuGrngdjtKg7vCqv5MfmBk/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/DNakLxuGrngdjtKg7vCqv5MfmBk/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content>
		<link rel="replies" type="text/html" href="http://www.digitalinternals.com/132/20090719/how-to-determine-the-linux-distribution/#comments" thr:count="0" />
		<link rel="replies" type="application/atom+xml" href="http://www.digitalinternals.com/132/20090719/how-to-determine-the-linux-distribution/feed/atom/" thr:count="0" />
		<thr:total>0</thr:total>
	</entry>
		<entry>
		<author>
			<name>ibrahim</name>
					</author>
		<title type="html"><![CDATA[Calculate Yesterday&#8217;s Date in UNIX Shell Script]]></title>
		<link rel="alternate" type="text/html" href="http://www.digitalinternals.com/131/20090705/calculate-yesterday-date-in-unix-shell-script/" />
		<id>http://www.digitalinternals.com/?p=131</id>
		<updated>2009-07-05T09:45:01Z</updated>
		<published>2009-07-05T09:19:09Z</published>
		<category scheme="http://www.digitalinternals.com" term="Uncategorized" /><category scheme="http://www.digitalinternals.com" term="date" /><category scheme="http://www.digitalinternals.com" term="linux" /><category scheme="http://www.digitalinternals.com" term="shell-script" /><category scheme="http://www.digitalinternals.com" term="unix" /><category scheme="http://www.digitalinternals.com" term="yesterday" />		<summary type="html"><![CDATA[There are times when you will need to calculate yesterday&#8217;s date in a UNIX shell script to run some date sensitive cron jobs. There are currently no standard command line tools in UNIX to perform such date arithmetic.

Writing a program in C or Java to perform such date arithmetic is actually an overkill. If you [...]]]></summary>
		<content type="html" xml:base="http://www.digitalinternals.com/131/20090705/calculate-yesterday-date-in-unix-shell-script/">&lt;p&gt;There are times when you will need to calculate yesterday&amp;#8217;s date in a UNIX shell script to run some date sensitive cron jobs. There are currently no standard command line tools in UNIX to perform such date arithmetic.&lt;/p&gt;
&lt;p&gt;&lt;span id="more-131"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Writing a program in C or Java to perform such date arithmetic is actually an overkill. If you have the GNU &lt;strong&gt;date&lt;/strong&gt; command installed, you can get the date quite easily by running date as follows:&lt;/p&gt;
&lt;pre&gt;
[ibrahim@anfield ~]#  date -d "-1 day"
Sat Jul  4 16:30:08 MPST 2009
&lt;/pre&gt;
&lt;p&gt;GNU &lt;strong&gt;date&lt;/strong&gt; is available in Linux distributions. It&amp;#8217;s not available by default in commercial UNIX distributions such as AIX or Solaris. To calculate yesterday&amp;#8217;s date for such platforms, you can use the following script instead. Save the following script to a file called &lt;strong&gt;yesterday&lt;/strong&gt;, chmod to 755 and copy it to a directory in your PATH.&lt;/p&gt;
&lt;pre class="brush: bash;"&gt;
#!/bin/sh

#
# Script to calculate yesterday's date with custom output date format
#
# Author: ibrahim - www.digitalinternals.com
#

  # default output format
  defaultof=&amp;quot;%Y%m%d&amp;quot;

  # check for input format, else use default format,
  # refer to 'man date' for help on format
  of=$defaultof
  [ $# -eq 1 ] &amp;amp;&amp;amp; of=&amp;quot;$1&amp;quot;

  # get today's date
  y=`date '+%Y'`
  m=`date '+%m'`
  d=`date '+%d'`

  # subtract 1 day
  d=`expr $d - 1`
  if [ $d -eq 0 ];  then
    # if day is 0, subtract month by 1
    m=`expr $m - 1`
    if [ $m -eq 0 ]; then
      # if month is 0, subtract year and set month to 12
      m=12
      y=`expr $y - 1`
    fi

    # set day depending on value of month
    d=31
    if [ $m -eq 4 ] || [ $m -eq 6 ] || [ $m -eq 9 ] || [ $m -eq 11 ] ; then
      d=30
    fi

    # check for leap year
    if [ $m -eq 2 ]; then
      d=28
      leap1=`expr $y % 4`
      leap2=`expr $y % 100`
      leap3=`expr $y % 400`
      if [ $leap1 -eq 0 ] ; then
        if [ $leap2 -gt 0 ] || [ $leap3 -eq 0 ] ; then
          d=29
        fi
      fi
    fi
  fi

  date -d &amp;quot;$y-$m-$d&amp;quot; +&amp;quot;$of&amp;quot;
&lt;/pre&gt;
&lt;p&gt;Below are some examples on how the script can be called:&lt;/p&gt;
&lt;pre&gt;
[ibrahim@anfield ~]# date
Sun Jul  5 17:13:12 MPST 2009

[ibrahim@anfield ~]# yesterday "%c"
Sat Jul  4 00:00:00 2009

[ibrahim@anfield ~]# yesterday
20090704

[ibrahim@anfield ~]# yesterday "%Y-%m-%d"
2009-07-04
&lt;/pre&gt;

&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/vtE89OWwVAqNqT1ug2XKHVXqn9A/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/vtE89OWwVAqNqT1ug2XKHVXqn9A/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/vtE89OWwVAqNqT1ug2XKHVXqn9A/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/vtE89OWwVAqNqT1ug2XKHVXqn9A/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content>
		<link rel="replies" type="text/html" href="http://www.digitalinternals.com/131/20090705/calculate-yesterday-date-in-unix-shell-script/#comments" thr:count="0" />
		<link rel="replies" type="application/atom+xml" href="http://www.digitalinternals.com/131/20090705/calculate-yesterday-date-in-unix-shell-script/feed/atom/" thr:count="0" />
		<thr:total>0</thr:total>
	</entry>
	</feed>
