<?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/tag/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>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>Perl: Hashes</title>
		<link>http://www.etechtips.com/2011/09/07/perl-hashes/</link>
		<comments>http://www.etechtips.com/2011/09/07/perl-hashes/#comments</comments>
		<pubDate>Wed, 07 Sep 2011 13:00:16 +0000</pubDate>
		<dc:creator>ecdown</dc:creator>
				<category><![CDATA[Perl]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Utilities]]></category>
		<category><![CDATA[hash]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[scripting]]></category>

		<guid isPermaLink="false">http://www.etechtips.com/?p=295</guid>
		<description><![CDATA[Here are some basics about Perl hashes that can be helpful to be used when an you need to associate a label with some value such as for names and telephone numbers or account numbers with amounts owed. Create a hash variable. my %hashvar; Create a hash reference my $refhash = {}; Add a value [...]]]></description>
			<content:encoded><![CDATA[<p>Here are some basics about Perl hashes that can be helpful to be used when an you need to associate a label with some value such as for names and telephone numbers or account numbers with amounts owed.</p>
<p>Create a hash variable.</p>
<pre>
my %hashvar;
</pre>
<p>Create a hash reference </p>
<pre>
my $refhash = {};
</pre>
<p>Add a value to a hash variable.</p>
<pre>
$hashvar{'somekey'} = 'someval';
</pre>
<p>Add a value to a hash reference.</p>
<pre>
$hashref->{'somekey'} = 'someotherval';
</pre>
<p>Access a value in a hash.</p>
<pre>
print $hashvar{'somekey'};
</pre>
<p>Access a value in a hash reference.</p>
<pre>
print $hashref->{'somekey}';
</pre>
<p>Access all Keys in a hash variable.<br />
foreach my $k (keys(%hashvar))<br />
{<br />
   print $hashvar{$k};<br />
}
</pre>
<p>Access all Keys in a hash reference.</p>
<pre>
foreach my $k (keys(%$hashref))
{
  print $k . "\n";
}
</pre>
<p>Access all Keys and values in a hash.</p>
<pre>
while (my ($key,$value) = each %hashvar)
{
  print "Key: " . $key . " has value:" . $value . "\n";
}
</pre>
<p>Access all Keys and values in a hash.</p>
<pre>
while (my ($key,$value) = each %$refhash)
{
  print "Key: " . $key . " has value:" . $value . "\n";
}
</pre>
<p>Assigning multiple values to a hash</p>
<pre>
%hasvar = (
  'test2' => 'myval',
  'test3' => 'myval3'
);
</pre>
<p>Note: This will clear the existing hash.</p>
<p>Delete a value from a hash</p>
<pre>
delete $hashvar{'key1'};
</pre>
<p>Delete a value from a hash reference.</p>
<pre>
delete $hashref->{'key1'};
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.etechtips.com/2011/09/07/perl-hashes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux:Script to find files</title>
		<link>http://www.etechtips.com/2011/08/17/linuxscript-to-find-files/</link>
		<comments>http://www.etechtips.com/2011/08/17/linuxscript-to-find-files/#comments</comments>
		<pubDate>Wed, 17 Aug 2011 13:30:48 +0000</pubDate>
		<dc:creator>ecdown</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[Utilities]]></category>
		<category><![CDATA[find]]></category>
		<category><![CDATA[scripting]]></category>

		<guid isPermaLink="false">http://www.etechtips.com/?p=396</guid>
		<description><![CDATA[I regularly have to find where a file is located and usually use find: find . &#124; grep Where is replaced with the filename or partial name to match. So I finally decided to write a script to just run this and allow me to print the matching names and even potentially pass the -i [...]]]></description>
			<content:encoded><![CDATA[<p>I regularly have to find where a file is located and usually use find:</p>
<pre>
find . | grep <filename>
</pre>
<p>Where <filename> is replaced with the filename or partial name to match.  So I finally decided to write a script to just run this and allow me to print the matching names and even potentially pass the -i flag to grep.</p>
<pre>
#!/bin/sh

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

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

find .  | grep $icase $search
</pre>
<p>This is just a simple script which I have named ffind that searches starting from the current directory.  This lets me search with the following commands:</p>
<pre>
ffind bak$
</pre>
<p>This will search for all files that end with &#8220;bak&#8221; .</p>
<pre>
ffind -i edr
</pre>
<p>This will search for all files with &#8220;edr&#8221; regardless of case</p>
]]></content:encoded>
			<wfw:commentRss>http://www.etechtips.com/2011/08/17/linuxscript-to-find-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using find and grep to search files</title>
		<link>http://www.etechtips.com/2011/08/16/using-find-and-grep-to-search-files/</link>
		<comments>http://www.etechtips.com/2011/08/16/using-find-and-grep-to-search-files/#comments</comments>
		<pubDate>Tue, 16 Aug 2011 13:15:30 +0000</pubDate>
		<dc:creator>ecdown</dc:creator>
				<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[Utilities]]></category>
		<category><![CDATA[find]]></category>
		<category><![CDATA[scripting]]></category>

		<guid isPermaLink="false">http://www.etechtips.com/?p=380</guid>
		<description><![CDATA[I have been searching through source code and files for years. And I used to use find with a few arguments to get what I was looking for. find . -exec grep {} \; -print I used the -print after the exec arguments to show the file only when the grep succeeded.  This worked but was [...]]]></description>
			<content:encoded><![CDATA[<p>I have been searching through source code and files for years. And I used to use find with a few arguments to get what I was looking for.</p>
<pre>find . -exec grep  {} \; -print</pre>
<p>I used the -print after the exec arguments to show the file only when the grep succeeded.  This worked but was a bit to type each time I used it. So I came up with a little script that would help me to search for the an argument and even allow a case insensitive search as well.<br />
&nbsp;</p>
<pre>#!/bin/sh

if [ $# -lt 1 ]; then
  echo 1&gt;&amp;2 Usage: $0 ""
  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>The script takes at least one argument and excepts a &#8216;-i&#8217; argument to make grep use a case insensitive search.  This will print the file name and the line that matches the search term.  It can be easily adapted to show the count of matched patterns (&#8216;-c&#8217;) or the line number (&#8216;-n&#8217;). </p>
]]></content:encoded>
			<wfw:commentRss>http://www.etechtips.com/2011/08/16/using-find-and-grep-to-search-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mounting drives in Linux</title>
		<link>http://www.etechtips.com/2011/08/09/mounting-drives-in-linux/</link>
		<comments>http://www.etechtips.com/2011/08/09/mounting-drives-in-linux/#comments</comments>
		<pubDate>Tue, 09 Aug 2011 14:15:49 +0000</pubDate>
		<dc:creator>ecdown</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[OS]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Utilities]]></category>

		<guid isPermaLink="false">http://www.etechtips.com/?p=290</guid>
		<description><![CDATA[Sometimes you have a drive that your want to mount under Linux. The mount command can make the drive available to you. But you need to also create a directory to hold the mount point. mkdir /mnt/drivepoint Then you can mount the drive to that mount point by using the mount command and giving the [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes you have a drive that your want to mount under Linux. The mount command can make the drive available to you. But you need to also create a directory to hold the mount point.</p>
<pre>
mkdir /mnt/drivepoint
</pre>
<p>Then you can mount the drive to that mount point by using the mount command and giving the device identifier, in this case it is /dev/sda1, and the mount point which we created as /mnt/drivepoint.  One thing to note, is that the mount will use whatever directory you specify, so if there are files located in the directory you use as a mount point, they will no longer be visible.</p>
<pre>
mount /dev/sda1 /mnt/drivepoint
</pre>
<p>This must be run as root or with the sudo command.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.etechtips.com/2011/08/09/mounting-drives-in-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Windows: Grep for windows</title>
		<link>http://www.etechtips.com/2011/05/02/windows-grep-for-windows/</link>
		<comments>http://www.etechtips.com/2011/05/02/windows-grep-for-windows/#comments</comments>
		<pubDate>Tue, 03 May 2011 00:14:26 +0000</pubDate>
		<dc:creator>ecdown</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Utilities]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.etechtips.com/?p=245</guid>
		<description><![CDATA[If you don&#8217;t have access to a Unix environment on your windows box, you can still search files with findstr. The findstr command will allow you to search files close to the same way as grep. findstr /S "search string" will recursively find your string in the current directory and subdirectories. There are more options [...]]]></description>
			<content:encoded><![CDATA[<p>If you don&#8217;t have access to a Unix environment on your windows box, you can still search files with findstr.  The findstr command will allow you to search files close to the same way as grep.</p>
<pre>findstr /S "search string"</pre>
<p>will recursively find your string in the current directory and subdirectories.</p>
<p>There are more options that you can find if you run the following command:</p>
<pre>findstr /?</pre>
<p> will show you the help message.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.etechtips.com/2011/05/02/windows-grep-for-windows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Capturing the screen in Windows</title>
		<link>http://www.etechtips.com/2009/11/13/capturing-the-screen-in-windows/</link>
		<comments>http://www.etechtips.com/2009/11/13/capturing-the-screen-in-windows/#comments</comments>
		<pubDate>Fri, 13 Nov 2009 17:19:59 +0000</pubDate>
		<dc:creator>techtipse</dc:creator>
				<category><![CDATA[Utilities]]></category>

		<guid isPermaLink="false">http://www.etechtips.com/?p=74</guid>
		<description><![CDATA[For the longest time, I thought the &#8220;Print Screen&#8221; or &#8220;PrtScr&#8221; Key on my keyboard was a throw back to much older computers with sheet fed dot matrix printers and would just print out the current Dos command shell. Once I figured out how to use it in windows, it has become an invaluable tool. [...]]]></description>
			<content:encoded><![CDATA[<p>For the longest time, I thought the &#8220;Print Screen&#8221; or &#8220;PrtScr&#8221; Key on my keyboard was a throw back to much older computers with sheet fed dot matrix printers and would just print out the current Dos command shell.</p>
<p>Once I figured out how to use it in windows, it has become an invaluable tool.</p>
<p>I used to create presentations of source code issues.  It was a great help to be able to grab a copy of the screen and place it in a Powerpoint slide or Word Doc.</p>
<p>If you need a complete screen capture or even just the current window, here is what you can do.</p>
<p>If you need to capture the complete screen, press the &#8220;Print Screen&#8221; button located near the top of the keyboard with the scroll lock or Pause key.    It may seem like nothing has happened, but the complete image of your current desktop has been saved into the clipboard in windows.</p>
<p>If you want to just capture the current window, make sure the window you want is active and press the  Alt and &#8220;Print Screen&#8221; keys together.</p>
<p>Now open Paint, MS Word or any other program capable of handling images, and type Ctrl-V.  This will take the image that has been captured into memory and place it in the program.  Now you can manipulate the image to crop it or use it in your document.</p>
<p>This is a built in function of the MS Windows Operating system.</p>
<p>If you need more control there are other applications that can let you capture portions of the screen at any time and create a file with a simple keystroke, such as <a href="http://www.techsmith.com/screen-capture.asp">SnagIt!</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.etechtips.com/2009/11/13/capturing-the-screen-in-windows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to split large files for emailing</title>
		<link>http://www.etechtips.com/2009/06/08/how-to-split-large-files-for-emailing/</link>
		<comments>http://www.etechtips.com/2009/06/08/how-to-split-large-files-for-emailing/#comments</comments>
		<pubDate>Tue, 09 Jun 2009 04:02:20 +0000</pubDate>
		<dc:creator>techtipse</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Utilities]]></category>

		<guid isPermaLink="false">http://etechtips.com/?p=38</guid>
		<description><![CDATA[I had to send a large file (about 100MB) to a client for analysis.  They did not have an anonymous ftp server so I had to figure a way to e-mail the file to them and then have a way to put it back together. I found the split command very useful.  I use Linux [...]]]></description>
			<content:encoded><![CDATA[<p>I had to send a large file (about 100MB) to a client for analysis.  They did not have an anonymous ftp server so I had to figure a way to e-mail the file to them and then have a way to put it back together.</p>
<p>I found the split command very useful.  I use Linux when I can but have installed <a href="http://www.cygwin.com">Cygwin</a> on my Windows PC to get the same functionality.</p>
<p>Here is a way to break the file into 5 megabyte chunks:</p>
<pre># split -b 8m veryLargeInputFile</pre>
<p>This instance splits veryLargeInputFile 8MB segments named xaa xab xac&#8230;xap.</p>
<p>Now put the file back together  at the distant end:</p>
<pre># cat xaa xab xac xad xae xaf xag xah xai xaj &gt; veryLargeInputFile</pre>
<p>or</p>
<pre># cat * &gt;veryLargeInputFile</pre>
<p><strong>Note: </strong>ensure xa* are the only files in the directory when using the wildcard<br />
For ASCII files: Split lines &#8212; This example splits a document into 1000 line segments.</p>
<pre># split -l 1000 veryLargeTextFile</pre>
<p>Use the same process to put the file back together again.</p>
<p><strong>Note: </strong>For larger files, find a ftp server or make your filesize increments bigger.</p>
<p>Split options</p>
<p>-b ##   &#8212; replace ## with the number of bytes you want in a file</p>
<p>-C ##   &#8212; replace ## with the number of SIZE bytes of lines per output file</p>
<p>-l ##     &#8212; replace ## with the number of lines per file.</p>
<p>-d          &#8212; use numeric suffixes for output files instead of alphabetic</p>
]]></content:encoded>
			<wfw:commentRss>http://www.etechtips.com/2009/06/08/how-to-split-large-files-for-emailing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

