<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>eTechTips &#187; Utilities</title>
	<atom:link href="http://www.etechtips.com/articles/software/utilities/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.etechtips.com</link>
	<description>Your Technical resource</description>
	<lastBuildDate>Wed, 01 Feb 2012 21:38:57 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Perl: Format date strings</title>
		<link>http://www.etechtips.com/2011/12/07/perl-format-date-strings/</link>
		<comments>http://www.etechtips.com/2011/12/07/perl-format-date-strings/#comments</comments>
		<pubDate>Wed, 07 Dec 2011 19:48:57 +0000</pubDate>
		<dc:creator>ecdown</dc:creator>
				<category><![CDATA[Perl]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Utilities]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[scripting]]></category>

		<guid isPermaLink="false">http://www.etechtips.com/?p=586</guid>
		<description><![CDATA[The other day I had a requirement to fill in a date value while creating an entity in ClearQuest. The field that was required was a date and was formatted as &#8220;mm/dd/yyyy hh:MM::SS AM&#124;PM&#8221;. I used the localtime function to return the date and used sprintf to format the date to the proper output. The [...]]]></description>
			<content:encoded><![CDATA[<p>The other day I had a requirement to fill in a date value while creating an entity in ClearQuest.  The field that was required was a date and was formatted as &#8220;mm/dd/yyyy hh:MM::SS AM|PM&#8221;.  I used the localtime function to return the date and used sprintf to format the date to the proper output.<br />
The reason I used sprintf was that for hours, months and days less 10 the output was 1 digit instead of two and the input was not allowed.  The %02d states that the digits used will be a minumum of 2 in this case.</p>
<p>Here is the sample program I wrote to test the expected output:</p>
<pre>
 my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime;

# formatted just by concatenating output
my $datestring = $mon . "/" . $mday . "/" . $year . "  " . $hour . ":" . $min.
":" . $sec  ;

# formatted using sprintf to ensure proper digit counts are output
my $datestring2 = sprintf("%02d/%02d/%04d %d:%02d:%02d %s",$mon,$mday,1900 +$yea
r,$hour,$min,$sec, $hour >= 12? "PM" : "AM");

 print $datestring;
  print $datestring2;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.etechtips.com/2011/12/07/perl-format-date-strings/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Rsync to backup a directory</title>
		<link>http://www.etechtips.com/2011/11/21/using-rsync-to-backup-a-directory/</link>
		<comments>http://www.etechtips.com/2011/11/21/using-rsync-to-backup-a-directory/#comments</comments>
		<pubDate>Mon, 21 Nov 2011 23:40:11 +0000</pubDate>
		<dc:creator>ecdown</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[OS]]></category>
		<category><![CDATA[Utilities]]></category>

		<guid isPermaLink="false">http://www.etechtips.com/?p=168</guid>
		<description><![CDATA[Recently I was moving data between an old server and new web server. I had some 250 GB of data and thought about just using Secure Copy (scp). When I started the process, I walked away thinking &#8220;No Problem&#8221;, but after a few files, I got an error due to file permissions and I did [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I was moving data between an old server and new web server.  I had some 250 GB of data and thought about just using Secure Copy (scp).  When I started the process, I walked away<br />
thinking &#8220;No Problem&#8221;, but after a few files, I got an error due to file permissions and I did not want to figure out what files had not been copied yet or where to try to restart.<br />
   So I used rsync to mirror the drive.  I was able to set it up and due to my slow network speed, it still took several days, but I was certain that I had gotten all the data.</p>
<pre>
rsync -azuv -e ssh  user@originserver:public_html/* public_html/
</pre>
<p>The options I used were for :</p>
<table cellpadding="3" bgcolor="white">
<tr>
<td>Option</td>
<td>Description</td>
</tr>
<tr>
<td>-a</td>
<td>Archive Mode</td>
</tr>
<tr>
<td>-z</td>
<td>Compress File Data</td>
</tr>
<tr>
<td>-u</td>
<td>Update Mode</td>
</tr>
<tr>
<td>-v</td>
<td>Verbose</td>
</tr>
<tr>
<td>-e <command></td>
<td>specify command to run</td>
</tr>
</table>
<p>This took some time to run, but I did not have to babysit the command and it duplicated the data from my old server to the new one.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.etechtips.com/2011/11/21/using-rsync-to-backup-a-directory/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DOS: Check for empty environment variable</title>
		<link>http://www.etechtips.com/2011/11/16/dos-check-for-empty-environment-variable/</link>
		<comments>http://www.etechtips.com/2011/11/16/dos-check-for-empty-environment-variable/#comments</comments>
		<pubDate>Wed, 16 Nov 2011 20:52:57 +0000</pubDate>
		<dc:creator>ecdown</dc:creator>
				<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[Utilities]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[DOS]]></category>
		<category><![CDATA[scripting]]></category>

		<guid isPermaLink="false">http://www.etechtips.com/?p=527</guid>
		<description><![CDATA[I was writing a batch file the other day and needed to change the argumets to a command based on if the user had specified his password on the command line. SET PASS=somepassword : or :SET PASS= if x%PASS%= X ( SET PASSARG=--password somepassword ) else ( SET PASSARG= ) commandtorun %PASSARG% Now if the [...]]]></description>
			<content:encoded><![CDATA[<p>I was writing a batch file the other day and needed to change the argumets to a command based on if the user had specified his password on the command line.</p>
<pre>
SET PASS=somepassword
: or
:SET PASS=
if x%PASS%= X (
  SET PASSARG=--password somepassword
) else
(
  SET PASSARG=
)

commandtorun %PASSARG%
</pre>
<p>Now if the user comments out his password, the script will make the PASSARG environment variable be empty or if they set a password the passarg variable will be filled in.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.etechtips.com/2011/11/16/dos-check-for-empty-environment-variable/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Java: Command line argument processing</title>
		<link>http://www.etechtips.com/2011/11/06/java-command-line-argument-processing/</link>
		<comments>http://www.etechtips.com/2011/11/06/java-command-line-argument-processing/#comments</comments>
		<pubDate>Mon, 07 Nov 2011 04:44:15 +0000</pubDate>
		<dc:creator>techtipse</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[Utilities]]></category>
		<category><![CDATA[Scripts]]></category>

		<guid isPermaLink="false">http://www.etechtips.com/?p=71</guid>
		<description><![CDATA[In each language that I have learned I have found it useful to know how to process command line arguments and here is a simple framework that I use for Java. I usually wrap the java command line in a bat or shell file to make it easier to run so that the user does [...]]]></description>
			<content:encoded><![CDATA[<p>In each language that I have learned I have found it useful to know how to process command line arguments and here is a simple framework that I use for Java.  I usually wrap the java command line in a bat or shell file to make it easier to run so that the user does not have to worry about classpath or path issues.</p>
<p>The following is the basic code to handle the command line arguments.</p>
<pre>
class CmdArgs
{

  public static void main(String[] args)
  {
      int argsize = args.length;
      String curarg;

      if (argsize > 0 )
      {

      }

      for(int i = 0; i < argsize; i++)
      {
          if (args[i].equals("--host")
          {
             args++;
             host = args[i];
           }
          else if (args[i].equals("--debug")
          {
               debug = 1;
          }
          else
          {
              System.out.println("Unknown option: " + args[i]);
              System.exit(1);
          }
       }

   }
}
</pre>
<p>The bat file for Dos/Windows might look like this:</p>
<pre>
@echo off

java -cp c:\javabin;somejar.jar  com.etechtips.CmdArgs %*
</pre>
<p>The shell based file might look like:</p>
<pre>

java -cp /home/ecdown/javabin:somejar.jar com.etechtips.CmdArgs $*
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.etechtips.com/2011/11/06/java-command-line-argument-processing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux:Script to use find to search contents of files</title>
		<link>http://www.etechtips.com/2011/11/03/linuxscript-to-find-in-contents-of-files/</link>
		<comments>http://www.etechtips.com/2011/11/03/linuxscript-to-find-in-contents-of-files/#comments</comments>
		<pubDate>Thu, 03 Nov 2011 19:39:43 +0000</pubDate>
		<dc:creator>ecdown</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[OS]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[Utilities]]></category>
		<category><![CDATA[scripting]]></category>

		<guid isPermaLink="false">http://www.etechtips.com/?p=501</guid>
		<description><![CDATA[I use find and grep quite a bit. I found that I was regularly searching for strings in file and was typing commands like: find . -exec grep "somestring" {} \; --print This find command will search from the current directory and for each file will run grep on it and if it finds a [...]]]></description>
			<content:encoded><![CDATA[<p>I use find and grep quite a bit. I found that I was regularly searching for strings in file and was typing commands like:</p>
<pre>
find . -exec grep "somestring" {} \; --print
</pre>
<p>This find command will search from the current directory and for each file will run grep on it and if it finds a matching string, it will print the string and then the filename.  So I took this and moved it into a script.</p>
<pre>
#!/bin/sh

if [ $# -lt 1 ]; then
  echo 1>&#038;2 Usage: $0 "<search term>"
  exit 127
fi
icase=
search=

while [ $# -ge 1 ]; do
  case $1 in
     -i) icase=$1;;
      *) search=$1 ;;
  esac
  shift
done

find . -type f -print0 | xargs -0 grep $icase $search
</pre>
<p>This allows me to run a command such as</p>
<pre>
efind -i Super
</pre>
<p>This command will search all files starting from the current directory and recurse directories and the &#8220;-i&#8221; will tell it to ignore case.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.etechtips.com/2011/11/03/linuxscript-to-find-in-contents-of-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux: Processor info and speed</title>
		<link>http://www.etechtips.com/2011/10/27/linux-processor-info-and-speed/</link>
		<comments>http://www.etechtips.com/2011/10/27/linux-processor-info-and-speed/#comments</comments>
		<pubDate>Thu, 27 Oct 2011 14:55:24 +0000</pubDate>
		<dc:creator>ecdown</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[OS]]></category>
		<category><![CDATA[Utilities]]></category>
		<category><![CDATA[processor]]></category>

		<guid isPermaLink="false">http://www.etechtips.com/?p=498</guid>
		<description><![CDATA[There are times that I get on a Linux box and want to know about some of the resources available to me. There are tools that can accomplish this, but there are some files that contain basic settings about the resources available to the system. One of those file is: /proc/cpuinfo This file contains information [...]]]></description>
			<content:encoded><![CDATA[<p>There are times that I get on a Linux box and want to know about some of the resources available to me.  There are tools that can accomplish this, but there are some files that contain basic settings about the resources available to the system.  One of those file is:</p>
<pre>
/proc/cpuinfo
</pre>
<p>This file contains information about the Processors and you can do a simple:</p>
<pre>
more /proc/cpuinfo
</pre>
<p>to see all the details or you can grep for certain fields:</p>
<pre>
processor       -- This will show you how many processor entries there are.
cpu MHz  or MHz -- This will show you the speed of the processors.
cache size      -- This will show you the cache size available to the processor.
model           -- This will show you the type and model of the processor you are using.
</pre>
<p>There are quite a few more fields, but these are the ones that I check the most.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.etechtips.com/2011/10/27/linux-processor-info-and-speed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>VI: Reload Current file</title>
		<link>http://www.etechtips.com/2011/10/26/vi-reload-current-file/</link>
		<comments>http://www.etechtips.com/2011/10/26/vi-reload-current-file/#comments</comments>
		<pubDate>Wed, 26 Oct 2011 19:12:47 +0000</pubDate>
		<dc:creator>ecdown</dc:creator>
				<category><![CDATA[Editors]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Utilities]]></category>
		<category><![CDATA[vi]]></category>
		<category><![CDATA[editors]]></category>
		<category><![CDATA[utilitie]]></category>

		<guid isPermaLink="false">http://www.etechtips.com/?p=495</guid>
		<description><![CDATA[When I am editing and having a &#8220;clumsy fingers&#8221; day, I find that I have to reload the file that I am editing from disk repeatedly. I usually just do a quick &#8220;:q!&#8221; and re-run the vi command that opened the file. But there is a better way! Use the :edit command: :edit Or you [...]]]></description>
			<content:encoded><![CDATA[<p>When I am editing and having a &#8220;clumsy fingers&#8221; day, I find that I have to reload the file that I am editing from disk repeatedly.  I usually just do a quick &#8220;:q!&#8221; and re-run the vi command that opened the file.  But there is a better way!</p>
<p>Use the :edit command:</p>
<pre>
:edit
</pre>
<p>Or you can shorten it to </p>
<pre>
:e
</pre>
<p>Now if you have typed in the window you are editing and want to reload from disk anyway without saving, remember to add the exclamation point(!) to the command.</p>
<pre>
:edit!
</pre>
<p>or </p>
<pre>
:e!
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.etechtips.com/2011/10/26/vi-reload-current-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS: Background properties</title>
		<link>http://www.etechtips.com/2011/10/17/css-background-properties/</link>
		<comments>http://www.etechtips.com/2011/10/17/css-background-properties/#comments</comments>
		<pubDate>Mon, 17 Oct 2011 21:12:00 +0000</pubDate>
		<dc:creator>ecdown</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[Utilities]]></category>
		<category><![CDATA[properties]]></category>

		<guid isPermaLink="false">http://www.etechtips.com/?p=481</guid>
		<description><![CDATA[These are the individual background properties in CSS. background-color background-image background-repeat background-attachement background-position The background-color property specifies the color of the element. This can be useful to specify if someone has turned images off and you want a non-default view of your content. You can use a hex value (#RRGGBB), a shortcut hex value (#RGB) [...]]]></description>
			<content:encoded><![CDATA[<p>These are the individual background properties in CSS.  </p>
<pre>
background-color
background-image
background-repeat
background-attachement
background-position
</pre>
<p>The background-color property specifies the color of the element.  This can be useful to specify if someone has turned images off and you want a non-default view of your content.  You can use a hex value (#RRGGBB), a shortcut hex value (#RGB) or a named color (red, green,blue).</p>
<pre>
background-color: #fffffff;
</pre>
<p>The background-image specifies an image to place in the background of an element.  Remember that the image should be supported by as many browsers as possible.  This means using jpeg, pngs or gifs, not tifs or proprietary image formats.  </p>
<pre>
background-image: url(images/someimage.gif)
</pre>
<p>The background-repeat property specifies how an image should display within an element.  You can have it repeat across (repeat-x), repeat downwards (repeat-y) or not repeat (no-repeat).</p>
<pre>
background-repeat: repeat-x;
</pre>
<p>The background-attachmemnt attribute is used to specify if an image should scroll (scroll) with the page, be fixed (fixed) to the page or inherit position from a parent element (inherit).</p>
<pre>
background-attachment: fixed;
</pre>
<p>The background-position attribute is used to specify the starting position of an image.  This can be useful if you are using a sprite to speed up loading times.  The background-position attribute can take a Xpx Ypx argument, an X% Y% argument, named arguments(left top, right bottom,&#8230;) or inherit from the parent.</p>
<pre>
background-position: 50% 50%;
</pre>
<p>Here is an example of the use of these:</p>
<pre>
 body {
   background-color: #ffffff;
   background-image: url(images/someimage.gif);
   background-repeat: no-repeat;
   background-attachment: fixed ;
   background-position: left top ;
}
</pre>
<p>You can also use a short cut method to the background property.</p>
<pre>
 .imagebox {
  background: #ffffff url(images/someimage.gif) no-repeat fixed right top;
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.etechtips.com/2011/10/17/css-background-properties/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Notepad++: Changing shortcut keys</title>
		<link>http://www.etechtips.com/2011/10/03/notepad-changing-shortcut-keys/</link>
		<comments>http://www.etechtips.com/2011/10/03/notepad-changing-shortcut-keys/#comments</comments>
		<pubDate>Tue, 04 Oct 2011 03:55:10 +0000</pubDate>
		<dc:creator>ecdown</dc:creator>
				<category><![CDATA[Editors]]></category>
		<category><![CDATA[Utilities]]></category>

		<guid isPermaLink="false">http://www.etechtips.com/?p=454</guid>
		<description><![CDATA[I was tracking a log file the other day and had to reload the file from disk regularly so I wanted to find out how to make a shortcut key to the Reload from disk menu entry on the File menu. Using the Settings->Shortcut Mapper to update the shortcuts for a given menu entry, I [...]]]></description>
			<content:encoded><![CDATA[<p>I was tracking a log file the other day and had to reload the file from disk regularly so I wanted to find out how to make a shortcut key to the Reload from disk menu entry on the File menu.  Using the Settings->Shortcut Mapper to update the shortcuts for a given menu entry, I chose the Ctrl-R sequence but you are welcome to find an unmapped key sequence that works for you.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.etechtips.com/2011/10/03/notepad-changing-shortcut-keys/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Viewing many different video formats on Windows</title>
		<link>http://www.etechtips.com/2011/10/03/viewing-many-different-video-formats-on-windows/</link>
		<comments>http://www.etechtips.com/2011/10/03/viewing-many-different-video-formats-on-windows/#comments</comments>
		<pubDate>Tue, 04 Oct 2011 03:21:35 +0000</pubDate>
		<dc:creator>ecdown</dc:creator>
				<category><![CDATA[Utilities]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Video]]></category>

		<guid isPermaLink="false">http://www.etechtips.com/?p=452</guid>
		<description><![CDATA[So I lost my hard drive and went to play some of the videos that I have saved on the system and could no longer play them in Windows Media Player. I needed to download a set of video codecs to play my .vob files. I am using the K-Lite Codec Pack. Featured Software VIDEO [...]]]></description>
			<content:encoded><![CDATA[<p>So I lost my hard drive and went to play some of the videos that I have saved on the system and could no longer play them in Windows Media Player.  I needed to download a set of video codecs to play my .vob files.  I am using the  <a href="http://www.free-codecs.com/K_Lite_Codec_Pack_download.htm">K-Lite Codec Pack</a>.</p>
<p>Featured Software</p>
<p>        VIDEO CODECS<br />
        FFDShow MPEG-4<br />
        DivX 8<br />
        Koepi&#8217;s XviD Codec<br />
        DScaler MPEG Filters<br />
        Ogg Codecs<br />
        Xvid Video Codec<br />
        Nic&#8217;s XviD Codec<br />
        Ligos Indeo Codec<br />
        AUDIO CODECS<br />
        MPEG Layer-3 Codec<br />
        AC3 Filter<br />
        AC-3 ACM Codec<br />
        CoreVorbis Decoder<br />
        LAME DirectShow Filter<br />
        LAME MP3 Encoder<br />
        Monkey&#8217;s Audio<br />
        Vorbis Ogg ACM Codec</p>
<p>This allows me to view the files in other video apps as well.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.etechtips.com/2011/10/03/viewing-many-different-video-formats-on-windows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

