<?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>LosByers- Interesting Musings Helpful Hints from a Unix System Administrator &#187; Unix</title>
	<atom:link href="http://losbyers.com/wordpress/category/unix/feed/" rel="self" type="application/rss+xml" />
	<link>http://losbyers.com/wordpress</link>
	<description>All the info I need</description>
	<lastBuildDate>Fri, 30 Mar 2012 15:56:22 +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>Grep command for Windows</title>
		<link>http://losbyers.com/wordpress/2012/03/grep-command-for-windows/</link>
		<comments>http://losbyers.com/wordpress/2012/03/grep-command-for-windows/#comments</comments>
		<pubDate>Thu, 15 Mar 2012 19:50:23 +0000</pubDate>
		<dc:creator>LosByers</dc:creator>
				<category><![CDATA[Unix]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://losbyers.com/wordpress/?p=275</guid>
		<description><![CDATA[<p>Something that I have needed for a while while working with Windows.  Most of the systems I have include cygwin so  until now I had not really needed a windows grep equivalent.</p> <p>The built in windows command FindStr mirrors the capabilities of the Unix command Grep.</p> <p>Findstr /? FINDSTR [/B] [/E] [/L] [/R] [/S] [/I] [...]]]></description>
			<content:encoded><![CDATA[<p>Something that I have needed for a while while working with Windows.  Most of the systems I have include cygwin so  until now I had not really needed a windows grep equivalent.</p>
<p>The built in windows command <strong>FindStr </strong>mirrors the capabilities of the Unix command <strong>Grep</strong>.</p>
<p><strong>Findstr /?</strong><br />
FINDSTR [/B] [/E] [/L] [/R] [/S] [/I] [/X] [/V] [/N] [/M] [/O] [/P] [/F:file]<br />
[/C:string] [/G:file] [/D:dir list] [/A:color attributes] [/OFF[LINE]]<br />
strings [[drive:][path]filename[ ...]]<br />
/B         Matches pattern if at the beginning of a line.<br />
/E         Matches pattern if at the end of a line.<br />
/L         Uses search strings literally.<br />
/R         Uses search strings as regular expressions.<br />
/S         Searches for matching files in the current directory and all<br />
subdirectories.<br />
/I         Specifies that the search is not to be case-sensitive.<br />
/X         Prints lines that match exactly.<br />
/V         Prints only lines that do not contain a match.<br />
/N         Prints the line number before each line that matches.<br />
<strong> /M  </strong>       Prints only the filename if a file contains a match.  Same as &#8220;grep -l&#8221;<br />
/O         Prints character offset before each matching line.<br />
/P         Skip files with non-printable characters.<br />
/OFF[LINE] Do not skip files with offline attribute set.<br />
/A:attr    Specifies color attribute with two hex digits. See “color /?”<br />
/F:file    Reads file list from the specified file(/ stands for console).<br />
/C:string  Uses specified string as a literal search string.<br />
/G:file    Gets search strings from the specified file(/ stands for console).<br />
/D:dir     Search a semicolon delimited list of directories<br />
strings    Text to be searched for.<br />
[drive:][path]filename Specifies a file or files to search.</p>
<p>Example of using Findstr to search for multiple strings in succession within a log file.<br />
<strong>findstr “ERROR Caused Fail” c:logslog.log</strong></p>
<p>This command will search for the String ERROR then Caused, and Fail while parsing down a file. So if the file looked like this:<br />
Line1: Error Script Failed<br />
Line2: test1<br />
Line4: Caused by process down<br />
Line5: test2<br />
Line6: Error2</p>
<p>The FindStr output would look like this:<br />
Error Script Failed<br />
Caused by Process down<br />
Error2</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Flosbyers.com%2Fwordpress%2F2012%2F03%2Fgrep-command-for-windows%2F&amp;title=Grep%20command%20for%20Windows" id="wpa2a_2"><img src="http://losbyers.com/wordpress/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://losbyers.com/wordpress/2012/03/grep-command-for-windows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting up CYGWIN SSH</title>
		<link>http://losbyers.com/wordpress/2010/02/setting-up-cygwin-ssh/</link>
		<comments>http://losbyers.com/wordpress/2010/02/setting-up-cygwin-ssh/#comments</comments>
		<pubDate>Mon, 08 Feb 2010 22:10:05 +0000</pubDate>
		<dc:creator>LosByers</dc:creator>
				<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://losbyers.com/wordpress/?p=153</guid>
		<description><![CDATA[<p>This article is assuming that you have installed CYGWIN on your Winders environment already.</p> <p>I had troubles getting SSHD to run on the system and as with SSH it ended up being dumb file and/or directory permissions.</p> Make sure you have an /etc/password file. #  mkpasswd   -cl   &#62;   /etc/passwd Make sure you have [...]]]></description>
			<content:encoded><![CDATA[<p>This article is assuming that you have installed CYGWIN on your Winders environment already.</p>
<p>I had troubles getting SSHD to run on the system and as with SSH it ended up being dumb file and/or directory permissions.</p>
<ol>
<li>Make sure you have an /etc/password file.<br />
#  <span style="font-weight: bold; color: #660000;">mkpasswd   -cl   &gt;   /etc/passwd</span></li>
<li>Make sure you have an /etc/group file.<br />
# <span style="font-weight: bold; color: #660000;">mkgroup -l &gt; /etc/group</span></li>
<li>Setup the ssh config files.<br />
<span style="font-weight: bold; color: #660000;"># </span><span style="font-weight: bold; color: #660000;">/usr/bin/ssh-host-config<br />
<img class="aligncenter size-medium wp-image-154" title="cygwin_sshd_setup" src="http://losbyers.com/wordpress/wp-content/uploads/2010/02/cygwin_sshd_setup-300x141.png" alt="cygwin_sshd_setup" width="300" height="141" /></span></li>
<li>Fix user permissions<br />
# <span style="color: #660000;"><span style="color: #000000;"><span style="color: #660000; font-weight: bold;">chmod  755  /var<br />
# chmod 664 /var/log/sshd.log</span></span></span></li>
<li>Fix file ownership<br />
# chown cyg_server /var/empty<br />
# chown cyg_server /etc/ssh*</li>
<li>Test starting the SSHD service<br />
# <strong><span style="color: #660000;">net start sshd </span></strong></li>
<li>If it doesn&#8217;t start consult the log file<br />
# less /var/log/sshd.log</li>
</ol>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Flosbyers.com%2Fwordpress%2F2010%2F02%2Fsetting-up-cygwin-ssh%2F&amp;title=Setting%20up%20CYGWIN%20SSH" id="wpa2a_4"><img src="http://losbyers.com/wordpress/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://losbyers.com/wordpress/2010/02/setting-up-cygwin-ssh/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Notepad++ Keyboard Shortcuts</title>
		<link>http://losbyers.com/wordpress/2010/01/notepad-keyboard-shortcuts/</link>
		<comments>http://losbyers.com/wordpress/2010/01/notepad-keyboard-shortcuts/#comments</comments>
		<pubDate>Thu, 21 Jan 2010 20:29:24 +0000</pubDate>
		<dc:creator>LosByers</dc:creator>
				<category><![CDATA[Unix]]></category>
		<category><![CDATA[Web Related]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[scripting]]></category>

		<guid isPermaLink="false">http://losbyers.com/wordpress/2010/01/notepad-keyboard-shortcuts/</guid>
		<description><![CDATA[<p>Notepad++ has become my favorite editor when coding PHP or XML. It just has so many useful little features. You can have all of the documents you need opened in one window and separated with tabs. You can have a 2nd workspace hidden within the same window, which is great when you are updating some [...]]]></description>
			<content:encoded><![CDATA[<p><a title="Notepadd++ download site " href="http://notepad-plus.sourceforge.net">Notepad++ </a>has become my favorite editor when coding PHP or XML.  It just has so many useful little features.  You can have all of the documents you need opened in one window and separated with tabs.  You can have a 2nd workspace hidden within the same window, which is great when you are updating some code, you can have the original in one &#8220;view&#8221; and the new code in another view.  The FIND feature of looking into all open documents, or documents in a directory is awesome to have if you are stuck on windows and don&#8217;t have cools tools like &#8216;find&#8217; and &#8216;grep&#8217; handy.  I have also setup my own &#8220;language&#8221; that parses through Java error logs so that you can collapse each error and skip all of the &#8220;at ..&#8221; lines when not needed.</p>
<p>The TextFX plugins are awesome and the XML re-indent tool has been a real life saver and speeds up fixing messed up CSS sheets and other XML coding.</p>
<p>Read more to get a list of the Notepad++ keyboard shortcut keys.</p>
<p><span id="more-140"></span></p>
<table style="border-collapse: collapse; table-layout: fixed; width: 586pt;" border="0" cellspacing="0" cellpadding="0" width="781">
<col style="width: 91pt;" width="121"></col>
<col style="width: 303pt;" width="404"></col>
<col style="width: 48pt;" span="4" width="64"></col>
<tbody>
<tr style="height: 15pt;" height="20">
<td style="height: 15pt; width: 394pt;" colspan="2" width="525" height="20">List of Notepad++ shortcut keys (Bold I use most)</td>
<td style="width: 48pt;" width="64"></td>
<td style="width: 48pt;" width="64"></td>
<td style="width: 48pt;" width="64"></td>
<td style="width: 48pt;" width="64"></td>
</tr>
<tr style="height: 15pt;" height="20">
<td class="xl65" style="height: 15pt;" height="20">Shortcut</td>
<td class="xl65"><span style="mso-spacerun:yes"> </span>Action</td>
<td style="mso-ignore:colspan" colspan="4"></td>
</tr>
<tr style="height: 15pt;" height="20">
<td class="xl65" style="height: 15pt;" height="20">Ctrl-C</td>
<td class="xl65">Copy<span style="mso-spacerun:yes"> </span></td>
<td style="mso-ignore:colspan" colspan="4"></td>
</tr>
<tr style="height: 15pt;" height="20">
<td class="xl65" style="height: 15pt;" height="20">Ctrl-X</td>
<td class="xl65">Cut<span style="mso-spacerun:yes"> </span></td>
<td style="mso-ignore:colspan" colspan="4"></td>
</tr>
<tr style="height: 15pt;" height="20">
<td class="xl65" style="height: 15pt;" height="20">Ctrl-V</td>
<td class="xl65">Paste<span style="mso-spacerun:yes"> </span></td>
<td style="mso-ignore:colspan" colspan="4"></td>
</tr>
<tr style="height: 15pt;" height="20">
<td class="xl65" style="height: 15pt;" height="20">Ctrl-Z</td>
<td class="xl65">Undo<span style="mso-spacerun:yes"> </span></td>
<td style="mso-ignore:colspan" colspan="4"></td>
</tr>
<tr style="height: 15pt;" height="20">
<td style="height: 15pt;" height="20">Ctrl-Y</td>
<td>Redo<span style="mso-spacerun:yes"> </span></td>
<td style="mso-ignore:colspan" colspan="4"></td>
</tr>
<tr style="height: 15pt;" height="20">
<td class="xl65" style="height: 15pt;" height="20">Ctrl-A</td>
<td class="xl65">Select All<span style="mso-spacerun:yes"> </span></td>
<td style="mso-ignore:colspan" colspan="4"></td>
</tr>
<tr style="height: 15pt;" height="20">
<td class="xl65" style="height: 15pt;" height="20"><strong>Ctrl-F</strong></td>
<td class="xl65">Launch Find Dialog<span style="mso-spacerun:yes"> </span></td>
<td style="mso-ignore:colspan" colspan="4"></td>
</tr>
<tr style="height: 15pt;" height="20">
<td class="xl65" style="height: 15pt;" height="20"><strong>Ctrl-H</strong></td>
<td class="xl65">Launch Find / Replace Dialog<span style="mso-spacerun:yes"> </span></td>
<td style="mso-ignore:colspan" colspan="4"></td>
</tr>
<tr style="height: 15pt;" height="20">
<td style="height: 15pt;" height="20">Ctrl-D</td>
<td>Duplicate Current Line<span style="mso-spacerun:yes"> </span></td>
<td style="mso-ignore:colspan" colspan="4"></td>
</tr>
<tr style="height: 15pt;" height="20">
<td style="height: 15pt;" height="20">Ctrl-L</td>
<td>Delete Current Line<span style="mso-spacerun:yes"> </span></td>
<td style="mso-ignore:colspan" colspan="4"></td>
</tr>
<tr style="height: 15pt;" height="20">
<td style="height: 15pt;" height="20">Ctrl-T</td>
<td>Switch the current line position with the previous line position<span style="mso-spacerun:yes"> </span></td>
<td style="mso-ignore:colspan" colspan="4"></td>
</tr>
<tr style="height: 15pt;" height="20">
<td style="height: 15pt;" height="20"><strong>F3</strong></td>
<td>Find Next<span style="mso-spacerun:yes"> </span></td>
<td style="mso-ignore:colspan" colspan="4"></td>
</tr>
<tr style="height: 15pt;" height="20">
<td style="height: 15pt;" height="20">Shft-F3</td>
<td>Find Previous<span style="mso-spacerun:yes"> </span></td>
<td style="mso-ignore:colspan" colspan="4"></td>
</tr>
<tr style="height: 15pt;" height="20">
<td style="height: 15pt;" height="20">Ctrl-Shft-F</td>
<td>Find in Files<span style="mso-spacerun:yes"> </span></td>
<td style="mso-ignore:colspan" colspan="4"></td>
</tr>
<tr style="height: 15pt;" height="20">
<td style="height: 15pt;" height="20">Ctrl-F3</td>
<td>Find (volatil) Next<span style="mso-spacerun:yes"> </span></td>
<td style="mso-ignore:colspan" colspan="4"></td>
</tr>
<tr style="height: 15pt;" height="20">
<td style="height: 15pt;" height="20">Ctrl-Shft-F3</td>
<td>Find (volatil) Previous<span style="mso-spacerun:yes"> </span></td>
<td style="mso-ignore:colspan" colspan="4"></td>
</tr>
<tr style="height: 15pt;" height="20">
<td style="height: 15pt;" height="20">Ctrl-Shft-I</td>
<td>Incremental Search<span style="mso-spacerun:yes"> </span></td>
<td style="mso-ignore:colspan" colspan="4"></td>
</tr>
<tr style="height: 15pt;" height="20">
<td class="xl65" style="height: 15pt;" height="20"><strong>Ctrl-S</strong></td>
<td class="xl65">Save File<span style="mso-spacerun:yes"> </span></td>
<td style="mso-ignore:colspan" colspan="4"></td>
</tr>
<tr style="height: 15pt;" height="20">
<td class="xl65" style="height: 15pt;" height="20"><strong>Ctrl-Alt-S</strong></td>
<td class="xl65">Save As<span style="mso-spacerun:yes"> </span></td>
<td style="mso-ignore:colspan" colspan="4"></td>
</tr>
<tr style="height: 15pt;" height="20">
<td class="xl65" style="height: 15pt;" height="20"><strong>Ctrl-Shft-S</strong></td>
<td class="xl65">Save All<span style="mso-spacerun:yes"> </span></td>
<td style="mso-ignore:colspan" colspan="4"></td>
</tr>
<tr style="height: 15pt;" height="20">
<td style="height: 15pt;" height="20">Ctrl-O</td>
<td>Open File<span style="mso-spacerun:yes"> </span></td>
<td style="mso-ignore:colspan" colspan="4"></td>
</tr>
<tr style="height: 15pt;" height="20">
<td class="xl65" style="height: 15pt;" height="20"><strong>Ctrl-N</strong></td>
<td class="xl65">New Tab<span style="mso-spacerun:yes"> </span></td>
<td style="mso-ignore:colspan" colspan="4"></td>
</tr>
<tr style="height: 15pt;" height="20">
<td style="height: 15pt;" height="20">Ctrl-F2</td>
<td>Toggle Bookmark<span style="mso-spacerun:yes"> </span></td>
<td style="mso-ignore:colspan" colspan="4"></td>
</tr>
<tr style="height: 15pt;" height="20">
<td style="height: 15pt;" height="20">F2</td>
<td>Go To Next Bookmark<span style="mso-spacerun:yes"> </span></td>
<td style="mso-ignore:colspan" colspan="4"></td>
</tr>
<tr style="height: 15pt;" height="20">
<td style="height: 15pt;" height="20">Shft-F2</td>
<td>Go To Previous Bookmark<span style="mso-spacerun:yes"> </span></td>
<td style="mso-ignore:colspan" colspan="4"></td>
</tr>
<tr style="height: 15pt;" height="20">
<td style="height: 15pt;" height="20">Ctrl-G</td>
<td>Launch GoToLine Dialog<span style="mso-spacerun:yes"> </span></td>
<td style="mso-ignore:colspan" colspan="4"></td>
</tr>
<tr style="height: 15pt;" height="20">
<td style="height: 15pt;" height="20">Ctrl-W</td>
<td>Close Current Document<span style="mso-spacerun:yes"> </span></td>
<td style="mso-ignore:colspan" colspan="4"></td>
</tr>
<tr style="height: 15pt;" height="20">
<td style="height: 15pt;" height="20">Alt-Shft-Arrow key<span style="display:   none">s or Alt + Left mouse click</span></td>
<td>Column Mode Select<span style="mso-spacerun:yes"> </span></td>
<td style="mso-ignore:colspan" colspan="4"></td>
</tr>
<tr style="height: 15pt;" height="20">
<td style="height: 15pt;" height="20">F5</td>
<td>Launch Run Dialog<span style="mso-spacerun:yes"> </span></td>
<td style="mso-ignore:colspan" colspan="4"></td>
</tr>
<tr style="height: 15pt;" height="20">
<td style="height: 15pt;" height="20">Ctrl-Space</td>
<td>Launch CallTip ListBox<span style="mso-spacerun:yes"> </span></td>
<td style="mso-ignore:colspan" colspan="4"></td>
</tr>
<tr style="height: 15pt;" height="20">
<td class="xl65" style="height: 15pt;" height="20">Alt-Space</td>
<td class="xl65">Launch Word Completion ListBox<span style="mso-spacerun:yes"> </span></td>
<td style="mso-ignore:colspan" colspan="4"></td>
</tr>
<tr style="height: 15pt;" height="20">
<td style="height: 15pt;" height="20">Tab (selection of se<span style="display:none">veral lines)</span></td>
<td>Insert Tabulation or Space (Indent)<span style="mso-spacerun:yes"> </span></td>
<td style="mso-ignore:colspan" colspan="4"></td>
</tr>
<tr style="height: 15pt;" height="20">
<td style="height: 15pt;" height="20">Shft-Tab (selection <span style="display:none">of several lines)</span></td>
<td>Remove Tabulation or Space (outdent)<span style="mso-spacerun:yes"> </span></td>
<td style="mso-ignore:colspan" colspan="4"></td>
</tr>
<tr style="height: 15pt;" height="20">
<td style="height: 15pt;" height="20">Ctrl-(Keypad-/Keyp<span style="display:   none">ad+) or Ctrl + mouse wheel butto</span></td>
<td>Zoom in (+ or up) and Zoom out (- or down)<span style="mso-spacerun:yes"> </span></td>
<td style="mso-ignore:colspan" colspan="4"></td>
</tr>
<tr style="height: 15pt;" height="20">
<td style="height: 15pt;" height="20">Ctrl-Keypad/</td>
<td>Restore the original size from zoom<span style="mso-spacerun:yes"> </span></td>
<td style="mso-ignore:colspan" colspan="4"></td>
</tr>
<tr style="height: 15pt;" height="20">
<td style="height: 15pt;" height="20">F11</td>
<td>Toggle Full Screen Mode<span style="mso-spacerun:yes"> </span></td>
<td style="mso-ignore:colspan" colspan="4"></td>
</tr>
<tr style="height: 15pt;" height="20">
<td style="height: 15pt;" height="20">Ctrl-Tab</td>
<td>Next Document<span style="mso-spacerun:yes"> </span></td>
<td style="mso-ignore:colspan" colspan="4"></td>
</tr>
<tr style="height: 15pt;" height="20">
<td style="height: 15pt;" height="20">Ctrl-Shft-Tab</td>
<td>Previous Document<span style="mso-spacerun:yes"> </span></td>
<td style="mso-ignore:colspan" colspan="4"></td>
</tr>
<tr style="height: 15pt;" height="20">
<td style="height: 15pt;" height="20">Ctrl-Shft-Up</td>
<td>Move Current Line Up<span style="mso-spacerun:yes"> </span></td>
<td style="mso-ignore:colspan" colspan="4"></td>
</tr>
<tr style="height: 15pt;" height="20">
<td style="height: 15pt;" height="20">Ctrl-Shft-Down</td>
<td>Move Current Line Down<span style="mso-spacerun:yes"> </span></td>
<td style="mso-ignore:colspan" colspan="4"></td>
</tr>
<tr style="height: 15pt;" height="20">
<td style="height: 15pt;" height="20">Ctrl-Alt-F</td>
<td>Collapse the Current Level<span style="mso-spacerun:yes"> </span></td>
<td style="mso-ignore:colspan" colspan="4"></td>
</tr>
<tr style="height: 15pt;" height="20">
<td style="height: 15pt;" height="20">Ctrl-Alt-Shft-F</td>
<td>Uncollapse the Current Level<span style="mso-spacerun:yes"> </span></td>
<td style="mso-ignore:colspan" colspan="4"></td>
</tr>
<tr style="height: 15pt;" height="20">
<td style="height: 15pt;" height="20">Alt-0</td>
<td>Fold All<span style="mso-spacerun:yes"> </span></td>
<td style="mso-ignore:colspan" colspan="4"></td>
</tr>
<tr style="height: 15pt;" height="20">
<td class="xl65" style="height: 15pt;" height="20"><strong>Alt-(1~8)</strong></td>
<td class="xl65">Collapse the Level (1~8)<span style="mso-spacerun:yes"> </span></td>
<td style="mso-ignore:colspan" colspan="4"></td>
</tr>
<tr style="height: 15pt;" height="20">
<td style="height: 15pt;" height="20">Alt-Shft-0</td>
<td>Unfold All<span style="mso-spacerun:yes"> </span></td>
<td style="mso-ignore:colspan" colspan="4"></td>
</tr>
<tr style="height: 15pt;" height="20">
<td class="xl65" style="height: 15pt;" height="20"><strong>Alt-Shft-(1~8)</strong></td>
<td class="xl65">Uncollapse the Level (1~8)<span style="mso-spacerun:yes"> </span></td>
<td style="mso-ignore:colspan" colspan="4"></td>
</tr>
<tr style="height: 15pt;" height="20">
<td style="height: 15pt;" height="20">Ctrl-BackSpace</td>
<td>Delete to start of word<span style="mso-spacerun:yes"> </span></td>
<td style="mso-ignore:colspan" colspan="4"></td>
</tr>
<tr style="height: 15pt;" height="20">
<td style="height: 15pt;" height="20">Ctrl-Delete</td>
<td>Delete to end of word<span style="mso-spacerun:yes"> </span></td>
<td style="mso-ignore:colspan" colspan="4"></td>
</tr>
<tr style="height: 15pt;" height="20">
<td style="height: 15pt;" height="20">Ctrl-Shft-BackSpace</td>
<td>Delete to start of line<span style="mso-spacerun:yes"> </span></td>
<td style="mso-ignore:colspan" colspan="4"></td>
</tr>
<tr style="height: 15pt;" height="20">
<td class="xl65" style="height: 15pt;" height="20"><strong>Ctrl-Shft-Delete</strong></td>
<td class="xl65">Delete to end of line<span style="mso-spacerun:yes"> </span></td>
<td style="mso-ignore:colspan" colspan="4"></td>
</tr>
<tr style="height: 15pt;" height="20">
<td style="height: 15pt;" height="20">Ctrl-U</td>
<td>Convert to lower case<span style="mso-spacerun:yes"> </span></td>
<td style="mso-ignore:colspan" colspan="4"></td>
</tr>
<tr style="height: 15pt;" height="20">
<td style="height: 15pt;" height="20">Ctrl-Shft-U</td>
<td>Convert to UPPER CASE<span style="mso-spacerun:yes"> </span></td>
<td style="mso-ignore:colspan" colspan="4"></td>
</tr>
<tr style="height: 15pt;" height="20">
<td style="height: 15pt;" height="20"><strong>Ctrl-B</strong></td>
<td>Go to matching brace<span style="mso-spacerun:yes"> </span></td>
<td style="mso-ignore:colspan" colspan="4"></td>
</tr>
<tr style="height: 15pt;" height="20">
<td style="height: 15pt;" height="20">Ctrl-Shft-R</td>
<td>Start to record /Stop recording the macro<span style="mso-spacerun:yes"> </span></td>
<td style="mso-ignore:colspan" colspan="4"></td>
</tr>
<tr style="height: 15pt;" height="20">
<td style="height: 15pt;" height="20">Ctrl-Shft-P</td>
<td>Play recorded macro<span style="mso-spacerun:yes"> </span></td>
<td style="mso-ignore:colspan" colspan="4"></td>
</tr>
<tr style="height: 15pt;" height="20">
<td style="height: 15pt;" height="20">Ctrl-Q</td>
<td>Block comment/uncomment<span style="mso-spacerun:yes"> </span></td>
<td style="mso-ignore:colspan" colspan="4"></td>
</tr>
<tr style="height: 15pt;" height="20">
<td style="height: 15pt;" height="20">Ctrl-Shft-Q</td>
<td>Stream comment<span style="mso-spacerun:yes"> </span></td>
<td style="mso-ignore:colspan" colspan="4"></td>
</tr>
<tr style="height: 15pt;" height="20">
<td style="height: 15pt;" height="20">Ctrl-Shft-T</td>
<td>Copy current line to clipboard<span style="mso-spacerun:yes"> </span></td>
<td style="mso-ignore:colspan" colspan="4"></td>
</tr>
<tr style="height: 15pt;" height="20">
<td style="height: 15pt;" height="20">Ctrl-P</td>
<td>Print<span style="mso-spacerun:yes"> </span></td>
<td style="mso-ignore:colspan" colspan="4"></td>
</tr>
<tr style="height: 15pt;" height="20">
<td style="height: 15pt;" height="20">Alt-F4</td>
<td>Exit<span style="mso-spacerun:yes"> </span></td>
<td style="mso-ignore:colspan" colspan="4"></td>
</tr>
<tr style="height: 15pt;" height="20">
<td style="height: 15pt;" height="20">Ctrl-I</td>
<td>Split Lines<span style="mso-spacerun:yes"> </span></td>
<td style="mso-ignore:colspan" colspan="4"></td>
</tr>
<tr style="height: 15pt;" height="20">
<td style="height: 15pt;" height="20">Ctrl-J</td>
<td>Join Lines<span style="mso-spacerun:yes"> </span></td>
<td style="mso-ignore:colspan" colspan="4"></td>
</tr>
<tr style="height: 15pt;" height="20">
<td style="height: 15pt;" height="20">Ctrl-Alt-R</td>
<td>Text Direction RTL<span style="mso-spacerun:yes"> </span></td>
<td style="mso-ignore:colspan" colspan="4"></td>
</tr>
<tr style="height: 15pt;" height="20">
<td style="height: 15pt;" height="20">Ctrl-Alt-L</td>
<td>Text Direction LTR<span style="mso-spacerun:yes"> </span></td>
<td style="mso-ignore:colspan" colspan="4"></td>
</tr>
<tr style="height: 15pt;" height="20">
<td style="height: 15pt;" colspan="6" height="20"></td>
</tr>
<tr style="height: 15pt;" height="20">
<td style="height: 15pt;" height="20">F1</td>
<td>About<span style="mso-spacerun:yes"> </span></td>
<td style="mso-ignore:colspan" colspan="4"></td>
</tr>
<tr style="height: 15pt;" height="20">
<td style="height: 15pt;" height="20">F2</td>
<td>Go To Next Bookmark<span style="mso-spacerun:yes"> </span></td>
<td style="mso-ignore:colspan" colspan="4"></td>
</tr>
<tr style="height: 15pt;" height="20">
<td class="xl65" style="height: 15pt;" height="20">F3</td>
<td class="xl65">Find Next<span style="mso-spacerun:yes"> </span></td>
<td style="mso-ignore:colspan" colspan="4"></td>
</tr>
<tr style="height: 15pt;" height="20">
<td style="height: 15pt;" height="20">F4</td>
<td style="mso-ignore:colspan" colspan="5"></td>
</tr>
<tr style="height: 15pt;" height="20">
<td style="height: 15pt;" height="20">F5</td>
<td>Launch Run Dialog</td>
<td style="mso-ignore:colspan" colspan="4"></td>
</tr>
<tr style="height: 15pt;" height="20">
<td style="height: 15pt;" height="20">F6</td>
<td>Execute Command Dialog</td>
<td style="mso-ignore:colspan" colspan="4"></td>
</tr>
<tr style="height: 15pt;" height="20">
<td style="height: 15pt;" height="20">F7</td>
<td style="mso-ignore:colspan" colspan="5"></td>
</tr>
<tr style="height: 15pt;" height="20">
<td style="height: 15pt;" height="20">F8</td>
<td style="mso-ignore:colspan" colspan="5"></td>
</tr>
<tr style="height: 15pt;" height="20">
<td style="height: 15pt;" height="20">F9</td>
<td style="mso-ignore:colspan" colspan="5"></td>
</tr>
<tr style="height: 15pt;" height="20">
<td style="height: 15pt;" height="20">F10</td>
<td style="mso-ignore:colspan" colspan="5"></td>
</tr>
<tr style="height: 15pt;" height="20">
<td style="height: 15pt;" height="20">F11</td>
<td>Toggle Full Screen Mode</td>
<td style="mso-ignore:colspan" colspan="4"></td>
</tr>
<tr style="height: 15pt;" height="20">
<td style="height: 15pt;" height="20">F12</td>
<td>Post-it (Remove all menus)</td>
<td style="mso-ignore:colspan" colspan="4"></td>
</tr>
<tr style="height: 30pt;" height="40">
<td style="height: 30pt;" colspan="6" height="40"></td>
</tr>
<tr style="height: 15pt;" height="20">
<td style="height: 15pt;" height="20">Alt-F1</td>
<td>Get PHP Help From us2.php.net/manual</td>
<td style="mso-ignore:colspan" colspan="4"></td>
</tr>
<tr style="height: 15pt;" height="20">
<td style="height: 15pt;" height="20">Alt-F2</td>
<td>Launch Google Search</td>
<td style="mso-ignore:colspan" colspan="4"></td>
</tr>
<tr style="height: 15pt;" height="20">
<td style="height: 15pt;" height="20">Alt-F3</td>
<td>Launch Wikipedia Search</td>
<td style="mso-ignore:colspan" colspan="4"></td>
</tr>
<tr style="height: 15pt;" height="20">
<td style="height: 15pt;" height="20">Alt-F4</td>
<td>Exit Application</td>
<td style="mso-ignore:colspan" colspan="4"></td>
</tr>
<tr style="height: 15pt;" height="20">
<td style="height: 15pt;" height="20">Alt-F5</td>
<td>Open file<span style="mso-spacerun:yes"> </span></td>
<td style="mso-ignore:colspan" colspan="4"></td>
</tr>
<tr style="height: 15pt;" height="20">
<td class="xl65" style="height: 15pt;" height="20"><strong>Alt-F6</strong></td>
<td class="xl65">Opens a new window (Ctrl-N opens new Tab)</td>
<td style="mso-ignore:colspan" colspan="4"></td>
</tr>
<tr style="height: 30pt;" height="40">
<td style="height: 30pt;" colspan="6" height="40"></td>
</tr>
<tr style="height: 15pt;" height="20">
<td style="height: 15pt;" colspan="2" height="20">Menu Options of note:</td>
<td style="mso-ignore:colspan" colspan="4"></td>
</tr>
<tr style="height: 15pt;" height="20">
<td style="height: 15pt;" colspan="4" height="20">Right click on a Tab and Send the Tab to &#8220;The other View&#8221; this splits the<br />
window Virtually in two.</td>
<td style="mso-ignore:colspan" colspan="2"></td>
</tr>
<tr style="height: 15pt;" height="20">
<td style="height: 15pt;" colspan="6" height="20">Under the Run Tab there is the option to Open the Containing Folder, and open a Command<br />
Prompt to the containing folder</td>
</tr>
<p><!--[if supportMisalignedColumns]--></p>
<tr style="display:none" height="0">
<td style="width: 91pt;" width="121"></td>
<td style="width: 303pt;" width="404"></td>
<td style="width: 48pt;" width="64"></td>
<td style="width: 48pt;" width="64"></td>
<td style="width: 48pt;" width="64"></td>
<td style="width: 48pt;" width="64"></td>
</tr>
<p><!--[endif]--></tbody>
</table>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Flosbyers.com%2Fwordpress%2F2010%2F01%2Fnotepad-keyboard-shortcuts%2F&amp;title=Notepad%2B%2B%20Keyboard%20Shortcuts" id="wpa2a_6"><img src="http://losbyers.com/wordpress/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://losbyers.com/wordpress/2010/01/notepad-keyboard-shortcuts/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Open Source Alternatives</title>
		<link>http://losbyers.com/wordpress/2009/12/open-source-alternatives/</link>
		<comments>http://losbyers.com/wordpress/2009/12/open-source-alternatives/#comments</comments>
		<pubDate>Wed, 30 Dec 2009 20:54:26 +0000</pubDate>
		<dc:creator>LosByers</dc:creator>
				<category><![CDATA[Business Help]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://losbyers.com/wordpress/?p=111</guid>
		<description><![CDATA[<p>There is a ton of software a new business sometimes feels that they must purchase right when they are starting off a new business.</p> <p>There Word, Excel, and Powerpoint from Micro$soft that are usually very expensive.</p> <p>There is also money management software, project planning software, and graphic software.</p> <p>Well there is a solution for small [...]]]></description>
			<content:encoded><![CDATA[<p><span>There is a ton of software a new business sometimes feels that they must purchase right when they are starting off a new business.</p>
<p>There Word, Excel, and Powerpoint from Micro$soft that are usually very expensive.</p>
<p>There is also money management software, project planning software, and graphic software.</p>
<p>Well there is a solution for small businesses that are starting out is to use Open Source Software.<br />
There is a great web site that lists all of the commercial software along with it&#8217;s Open Source Alternative.<br />
Check out <a href="http://www.osalt.com/" target="_blank">Open Source Alternatives web site</a>.</p>
<p>They will show you stuff like<br />
Expensive App             Free Apps<br />
Photoshop                   The GIMP<br />
VISIO                         DIA<br />
MS Office                    Open Office<br />
Illustrator, CorelDraw  Inkscape<br />
Quickbooks                 Postbooks</p>
<p>There are many more and almost every big commercial application now has an Open Source alternative.  It is possible that you may need to be running Linux for some of these, but Ubuntu has become as easy to use as Windows or a Mac.</span></p>
<p><span>I found another Blog posting about 50 top applications and their alternatives.<br />
The post was made early in 2008 so the software most likely has gotten even better since then.</p>
<p>Check out <a href="http://whdb.com/2008/the-top-50-proprietary-programs-that-drive-you-crazy-and-their-open-source-alternatives/" target="_blank">http://whdb.com/2008/the-top-50-proprietary-programs-that-drive-you-crazy-and-their-open-source-alternatives/</a></span></p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Flosbyers.com%2Fwordpress%2F2009%2F12%2Fopen-source-alternatives%2F&amp;title=Open%20Source%20Alternatives" id="wpa2a_8"><img src="http://losbyers.com/wordpress/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://losbyers.com/wordpress/2009/12/open-source-alternatives/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sync Web Servers Script</title>
		<link>http://losbyers.com/wordpress/2009/12/sync-web-servers-script/</link>
		<comments>http://losbyers.com/wordpress/2009/12/sync-web-servers-script/#comments</comments>
		<pubDate>Mon, 28 Dec 2009 17:41:30 +0000</pubDate>
		<dc:creator>LosByers</dc:creator>
				<category><![CDATA[Unix]]></category>
		<category><![CDATA[Web Related]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[scripting]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://losbyers.com/wordpress/?p=74</guid>
		<description><![CDATA[<p>Here is a script I wrote to keep 2 or more web sites in sync.  The data files can be anything under the data tree. The database is MySQL.</p> <p>The script works by pulling the latest data and database backup from the production server.  The script can be placed in a cron. The DR server [...]]]></description>
			<content:encoded><![CDATA[<p>Here is a script I wrote to keep 2 or more web sites in sync.  The data files can be anything under the data tree.<br />
The database is MySQL.</p>
<p>The script works by pulling the latest data and database backup from the production server.  The script can be placed in a cron.<br />
The DR server user should be able to ssh without a password to the production server.  This is accomplished using RSA keys under SSH.</p>
<p>Once both the web site and database are setup, this script pulls the newest files, and latest mysql database backup via rsync.</p>
<p>Change the First set of VARIABLES, and &lt;usernames&gt; and &lt;pathing&gt; where needed.</p>
<p>I should probably have more information on the script here, but I wanted to save a copy somewhere before I forgot about it.</p>
<p>Anyway, my thought is if I setup a primary web server somewhere and want n+1 backend systems I might be able to use this poor-man&#8217;s approach.  If the backed systems need to have database updates then you are looking at database replication.  But, the rsync file copy and all of the rest could be used to make web server production updates to a cluster of systems.  You just update the main instance and all of the slave servers pull the latest information, including a database update script if needed., unix, script</p>
<p><span id="more-74"></span><span style="color: #99cc00;">#!/bin/ksh -x</p>
<p>#######################################<br />
#<br />
# Script to sync Prod web with DR server.<br />
# The script is designed to pull from the<br />
# production server.<br />
#<br />
# 12/2008:  Initial setup.<br />
#        :  Mike Byers<br />
#######################################</p>
<p>PRIME_HOST=&#8217;prod.edmz.com&#8217;                  #Production host<br />
DR_HOST=&#8217;dr-orprod2.edmz.com&#8217;              #DR server<br />
DATABASES=&#8221;mysql DB1 DB2&#8243;                  #database to transfer space sepa<br />
rated<br />
#MYSQLUSER=backup                               #User for database backup<br />
MYSQLUSER=restore                                  #User for database restore<br />
#MYSQLPWD=&#8217;ABC123&#8242;                             #Backup user Password<br />
MYSQLPWD=&#8217;ABC123&#8242;                               #Restore user Password (Restore user needs more DB permissions)<br />
DB_PATH=&#8217;/opt/mysql5/backups&#8217;                 #Path to database backup files<br />
#YESTERDAY=`date +%Y%m%d -d&#8221;1 day ago&#8221;`         #Linux Version<br />
YESTERDAY=`TZ=GMT+24 date +%Y%m%d`              #Solaris Version<br />
TODAY=`date +%Y%m%d`<br />
PATH=$PATH:/opt/mysql5/bin/;export PATH  #Path to mysql binaries</p>
<p>/usr/bin/rsync &#8211;exclude &#8216;configuration.*&#8217; \<br />
&#8211;exclude &#8216;**/logs&#8217; \<br />
&#8211;exclude &#8216;**/modules&#8217; \<br />
&#8211;exclude &#8216;**/conf&#8217; \<br />
&#8211;exclude &#8216;**/bin&#8217; \<br />
-vaue &#8216;ssh -x -C -l &lt;username&gt;&#8217; $PRIME_HOST:apache/htdocs/* /&lt;path&gt;/apache/htdocs/</p>
<p>for DB in $DATABASES<br />
do<br />
/usr/bin/rsync -vaue &#8216;ssh -x -C -l &lt;username&gt;&#8217; $PRIME_HOST:$DB_PATH/$DB-$TODAY.sql.<br />
gz $DB_PATH<br />
#Compare sizes of database backup files to see if anything changed<br />
S1=`du -sk $DB_PATH/$DB-$YESTERDAY.sql.gz | awk &#8216;{ print $1 }&#8217;`<br />
S2=`du -sk $DB_PATH/$DB-$TODAY.sql.gz | awk &#8216;{ print $1 }&#8217;`<br />
if [[ S1 -eq S2 ]]; then<br />
echo &#8220;No update for database $DB needed&#8221;<br />
else<br />
/bin/gunzip &lt; $DB_PATH/$DB-$TODAY.sql.gz | mysql -u $MYSQLUSER -p$MYSQLPWD<br />
$DB<br />
fi<br />
done</span></p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Flosbyers.com%2Fwordpress%2F2009%2F12%2Fsync-web-servers-script%2F&amp;title=Sync%20Web%20Servers%20Script" id="wpa2a_10"><img src="http://losbyers.com/wordpress/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://losbyers.com/wordpress/2009/12/sync-web-servers-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Funny Unix commands</title>
		<link>http://losbyers.com/wordpress/2009/12/funny-unix-commands/</link>
		<comments>http://losbyers.com/wordpress/2009/12/funny-unix-commands/#comments</comments>
		<pubDate>Mon, 28 Dec 2009 17:34:36 +0000</pubDate>
		<dc:creator>LosByers</dc:creator>
				<category><![CDATA[Humor]]></category>
		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://losbyers.com/wordpress/?p=70</guid>
		<description><![CDATA[<p>Handy command for those users that are most annoying.</p> <p># fuser -uck /you </p> <p>Find all the processes running under the mount point /you and kill them all ungracefully.</p> <p>About as much fun to read as</p> <p># sort -n ass &#124; uniq -c</p> <p>Unix can tell you all.</p> <p>Login and type /bin/csh then type the [...]]]></description>
			<content:encoded><![CDATA[<p><span>Handy command for those users that are most annoying.</span></p>
<p><strong># fuser -uck /you </strong></p>
<p>Find all the processes running under the mount point /you and kill them all ungracefully.</p>
<p>About as much fun to read as</p>
<p><strong># sort -n ass | uniq -c</strong></p>
<p><span>Unix can tell you all.</p>
<p>Login and type /bin/csh then type the following questions.</p>
<p><strong>% &#8220;How would you rate Bush&#8217;s stupidity? </strong><br />
&gt; Unmatched &#8221;</p>
<p><strong>% [But Where is his brain? </strong><br />
&gt; Missing ]</p>
<p><strong>% man: Why can they stop this war? </strong><br />
&gt; man:: Too many arguments</span></p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Flosbyers.com%2Fwordpress%2F2009%2F12%2Ffunny-unix-commands%2F&amp;title=Funny%20Unix%20commands" id="wpa2a_12"><img src="http://losbyers.com/wordpress/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://losbyers.com/wordpress/2009/12/funny-unix-commands/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Helpful Unix commands</title>
		<link>http://losbyers.com/wordpress/2009/12/helpful-unix-commands/</link>
		<comments>http://losbyers.com/wordpress/2009/12/helpful-unix-commands/#comments</comments>
		<pubDate>Mon, 28 Dec 2009 17:32:10 +0000</pubDate>
		<dc:creator>LosByers</dc:creator>
				<category><![CDATA[Unix]]></category>
		<category><![CDATA[KSH]]></category>
		<category><![CDATA[scripting]]></category>

		<guid isPermaLink="false">http://losbyers.com/wordpress/?p=68</guid>
		<description><![CDATA[<p>A thread dedicated to those useful Unix commands we all know and love.  Ya right. </p> <p>I need a really tricky find command the other day so I came up with the following.  I wanted to save the command some where as it really shows the power of find</p> <p>Find all files that are not [...]]]></description>
			<content:encoded><![CDATA[<p><span>A thread dedicated to those useful Unix commands we all know and love.  Ya right. <img title="Shocked" src="http://www.losbyers.com/modules/Forums/images/smiles/icon_eek.gif" border="0" alt="Shocked" /></p>
<p>I need a really tricky <span style="font-style: italic;">find</span> command the other day so I came up with the following.  I wanted to save the command some where as it really shows the power of <span style="font-style: italic;">find</span></p>
<p>Find all files that are not in the images or languages directory that are older than seven days that end with .php or .doc and delete them also leave a log file of what was deleted.</p>
<p><span style="font-weight: bold;"> find ./  \( -name images -o -name languages \) -prune -o \( -name &#8216;*.php&#8217; -o -name &#8216;*.doc&#8217; \) -mtime +7 -exec rm {} \; -print &gt; /var/tmp/deleted_files</span></p>
<p>Sorry the command is all on one line.  Because the <span style="font-style: italic;">find</span> statement is utilizing regular expressions and complex statements, ie &#8220;<span style="font-weight: bold;">\(</span>&#8220;, so you can&#8217;t use the &#8220;\&#8221; and take the statement to the next line.</p>
<p>To read the command better take it one step at a time.<br />
Find all files or directories that have the name &#8220;images&#8221; OR the name &#8220;languages&#8221; and prune/remove those items found from the find results.   Using the -prune option is a great way to setup exclusions.  The next &#8220;-o&#8221; OR says if the files found are not named &#8220;images&#8221; or &#8220;languages&#8221; find the files that end in &#8220;.php&#8221; or &#8220;.doc&#8221; that are older than 7 days.  If anything is found that meets the conditions then remove those files and &#8220;print&#8221; the file name out to the log file.</span></p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Flosbyers.com%2Fwordpress%2F2009%2F12%2Fhelpful-unix-commands%2F&amp;title=Helpful%20Unix%20commands" id="wpa2a_14"><img src="http://losbyers.com/wordpress/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://losbyers.com/wordpress/2009/12/helpful-unix-commands/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pass a Shell variable to a SED command</title>
		<link>http://losbyers.com/wordpress/2009/12/pass-a-shell-variable-to-a-sed-command/</link>
		<comments>http://losbyers.com/wordpress/2009/12/pass-a-shell-variable-to-a-sed-command/#comments</comments>
		<pubDate>Mon, 28 Dec 2009 17:29:40 +0000</pubDate>
		<dc:creator>LosByers</dc:creator>
				<category><![CDATA[Unix]]></category>
		<category><![CDATA[KSH]]></category>
		<category><![CDATA[scripting]]></category>

		<guid isPermaLink="false">http://losbyers.com/wordpress/?p=65</guid>
		<description><![CDATA[<p>I just helped a friend out with placing a shell variable into a sed command and thought it would be prudent to document it.</p> <p>This set of commands was to be used to change directory names inside a samba share, hense the directory names of \ and the unix escape needed making a bunch of [...]]]></description>
			<content:encoded><![CDATA[<p><span>I just helped a friend out with placing a shell variable into a sed command and thought it would be prudent to document it.</p>
<p>This set of commands was to be used to change directory names inside a samba share, hense the directory names of \ and the unix escape needed making a bunch of \\ appear.</p>
<p>server_name#  <strong>DIR=&#8221;blahblah&#8221; </strong><br />
server_name#  <strong>echo &#8220;bob&#8221; | sed &#8220;s/^/${DIR}\\\ADMIND__${DIR}\\\/&#8221; </strong><br />
<span style="font-weight: bold;">blahblah\ADMIND__blahblah\bob</span><br />
</span></p>
<p><span><br />
Set the variable DIR to &#8220;blahblah&#8221;, I should have just used &#8220;foo&#8221; it&#8217;s less to type.  Now echo the word &#8220;bob&#8221; but first add our variable and a prefix of &#8220;ADMIND__&#8221; to the front of bob.<br />
</span></p>
<p><span>I wanted to show another example, but don&#8217;t have time at the momment.</p>
<p>The important things to remember is to have the variables enclosed in double quotes.</span></p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Flosbyers.com%2Fwordpress%2F2009%2F12%2Fpass-a-shell-variable-to-a-sed-command%2F&amp;title=Pass%20a%20Shell%20variable%20to%20a%20SED%20command" id="wpa2a_16"><img src="http://losbyers.com/wordpress/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://losbyers.com/wordpress/2009/12/pass-a-shell-variable-to-a-sed-command/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Overcoming the dreaded SCP/SFTP message errors</title>
		<link>http://losbyers.com/wordpress/2009/12/overcoming-the-dreaded-scpsftp-message-errors/</link>
		<comments>http://losbyers.com/wordpress/2009/12/overcoming-the-dreaded-scpsftp-message-errors/#comments</comments>
		<pubDate>Mon, 28 Dec 2009 17:23:37 +0000</pubDate>
		<dc:creator>LosByers</dc:creator>
				<category><![CDATA[Unix]]></category>
		<category><![CDATA[Web Related]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://losbyers.com/wordpress/?p=62</guid>
		<description><![CDATA[<p>If you have ever used scp or sftp you may have encountered the dreaded ( &#8221;Received message too long&#8221; or &#8220;Bad packet length&#8221; &#8221;) errors.</p> <p>This is typically due to something being echo&#8217;d or sent back to your login attempt.</p> <p>Usually, it&#8217;s something you have in your .profile or .bashrc login files.</p> <p>Just add the [...]]]></description>
			<content:encoded><![CDATA[<p><span>If you have ever used scp or sftp you may have encountered the dreaded ( &#8221;Received message too long&#8221; or &#8220;Bad packet length&#8221; &#8221;) errors.</p>
<p>This is typically due to something being echo&#8217;d or sent back to your login attempt.</p>
<p>Usually, it&#8217;s something you have in your .profile or .bashrc login files.</p>
<p>Just add the following to the very top of your login shell settings file.</p>
<p><strong><span style="font-weight: bold;">if [ ${TERM} == "dumb" ]; then<br />
return<br />
fi</span></strong></p>
<p>This will exit out of running the login shell commands if you login using a &#8220;dumb&#8221; terminal.</span></p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Flosbyers.com%2Fwordpress%2F2009%2F12%2Fovercoming-the-dreaded-scpsftp-message-errors%2F&amp;title=Overcoming%20the%20dreaded%20SCP%2FSFTP%20message%20errors" id="wpa2a_18"><img src="http://losbyers.com/wordpress/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://losbyers.com/wordpress/2009/12/overcoming-the-dreaded-scpsftp-message-errors/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Procedure to swap ZFS pools Solaris</title>
		<link>http://losbyers.com/wordpress/2009/12/procedure-to-swap-zfs-pools-solaris/</link>
		<comments>http://losbyers.com/wordpress/2009/12/procedure-to-swap-zfs-pools-solaris/#comments</comments>
		<pubDate>Tue, 22 Dec 2009 22:21:37 +0000</pubDate>
		<dc:creator>LosByers</dc:creator>
				<category><![CDATA[Unix]]></category>
		<category><![CDATA[Solaris]]></category>

		<guid isPermaLink="false">http://losbyers.com/wordpress/?p=52</guid>
		<description><![CDATA[<p>Procedure to add a new ZFS pool to a system, copy the data from an old pool, switch the mounts and remove the old pool.</p> <p>Sorry there isn&#8217;t much in the way of comments or coloring.  It was just copied from the terminal window.  The procedure below does create the ZFS filesystem, clone it, move [...]]]></description>
			<content:encoded><![CDATA[<p><span>Procedure to add a new ZFS pool to a system, copy the data from an old pool, switch the mounts and remove the old pool.</span></p>
<p>Sorry there isn&#8217;t much in the way of comments or coloring.  It was just copied from the terminal window.  The procedure below does create the ZFS filesystem, clone it, move it, then deletes the old ZFS information.</p>
<p>The procedure uses disks mapped from and EMC array.  The reason it was needed is that a new EMC was introduced so the data needed to be copied from the old EMC to the new EMC disks, and the old EMC disks needed to be disconnected.</p>
<p>The procedure will walk through creating a volume, adding data to it, cloning it, swapping volumes, and deleting the original.</p>
<p><span id="more-52"></span></p>
<p><span> nj11mhf0016$ sudo zpool create -f -m /testa testz1 emcpower1a<br />
nj11mhf0016$ sudo zpool create -f -m /testb testz2 emcpower2a<br />
</span></p>
<p><span>nj11mhf0016$ zpool list<br />
NAME                    SIZE    USED   AVAIL    CAP  HEALTH     ALTROOT<br />
testz1                  101G     94K    101G     0%  ONLINE     -<br />
testz2                  101G     94K    101G     0%  ONLINE     -<br />
</span></p>
<p><span>nj11mhf0016$ df -k<br />
Filesystem            kbytes    used   avail capacity  Mounted on<br />
/dev/dsk/c0t0d0s0    108126717 6000499 101044951     6%    /<br />
/devices                   0       0       0     0%    /devices<br />
ctfs                       0       0       0     0%    /system/contract<br />
proc                       0       0       0     0%    /proc<br />
mnttab                     0       0       0     0%    /etc/mnttab<br />
swap                 61207120    1024 61206096     1%    /etc/svc/volatile<br />
objfs                      0       0       0     0%    /system/object<br />
fd                         0       0       0     0%    /dev/fd<br />
swap                 61206096       0 61206096     0%    /tmp<br />
swap                 61206152      56 61206096     1%    /var/run<br />
testz1               104251392      24 104251301     1%    /testa<br />
testz2               104251392      24 104251301     1%    /testb<br />
</span></p>
<p><span>nj11mhf0016$ sudo zfs create -o quota=24G testz1/data<br />
nj11mhf0016$ sudo zfs create -o quota=24G testz2/data<br />
</span></p>
<p><span>nj11mhf0016$ df -k<br />
Filesystem            kbytes    used   avail capacity  Mounted on<br />
/dev/dsk/c0t0d0s0    108126717 6000499 101044951     6%    /<br />
/devices                   0       0       0     0%    /devices<br />
ctfs                       0       0       0     0%    /system/contract<br />
proc                       0       0       0     0%    /proc<br />
mnttab                     0       0       0     0%    /etc/mnttab<br />
swap                 61207072    1024 61206048     1%    /etc/svc/volatile<br />
objfs                      0       0       0     0%    /system/object<br />
fd                         0       0       0     0%    /dev/fd<br />
swap                 61206048       0 61206048     0%    /tmp<br />
swap                 61206104      56 61206048     1%    /var/run<br />
testz1               104251392      25 104251271     1%    /testa<br />
testz2               104251392      24 104251272     1%    /testb<br />
testz1/data          25165824      24 25165799     1%    /testa/data<br />
testz2/data          25165824      24 25165799     1%    /testb/data</span></p>
<p># Copy in some data for testing<br />
sudo rsync -qa -H /var /testa/data/</p>
<p># Make a few test changes and copy the data to the 2nd mount point.<br />
sudo rsync -qa -H /testa/data/* /testb/data/</p>
<p>nj11mhf0016$ df -k<br />
Filesystem            kbytes    used   avail capacity  Mounted on<br />
/dev/dsk/c0t0d0s0    108126717 6000548 101044902     6%    /<br />
/devices                   0       0       0     0%    /devices<br />
ctfs                       0       0       0     0%    /system/contract<br />
proc                       0       0       0     0%    /proc<br />
mnttab                     0       0       0     0%    /etc/mnttab<br />
swap                 52008488    1024 52007464     1%    /etc/svc/volatile<br />
objfs                      0       0       0     0%    /system/object<br />
fd                         0       0       0     0%    /dev/fd<br />
swap                 52007464       0 52007464     0%    /tmp<br />
swap                 52007520      56 52007464     1%    /var/run<br />
testz1               104251392      25 99863975     1%    /testa<br />
testz2               104251392      26 99863897     1%    /testb<br />
testz1/data          25165824 4387236 20778587    18%    /testa/data<br />
testz2/data          25165824 4387339 20778485    18%    /testb/data</p>
<p>Now swap and delete them.</p>
<p>Move testa to the side, just in case.<br />
nj11mhf0016$ zfs list<br />
NAME          USED  AVAIL  REFER  MOUNTPOINT<br />
testz1       4.18G  95.2G  25.5K  /testa<br />
testz1/data  4.18G  19.8G  4.18G  /testa/data<br />
testz2       4.18G  95.2G  26.5K  /testb<br />
testz2/data  4.18G  19.8G  4.18G  /testb/data<br />
nj11mhf0016$ sudo mkdir /move<br />
nj11mhf0016$ sudo zfs set mountpoint=/move testz1</p>
<p>nj11mhf0016$ df -k<br />
Filesystem            kbytes    used   avail capacity  Mounted on<br />
/dev/dsk/c0t0d0s0    108126717 6000550 101044900     6%    /<br />
/devices                   0       0       0     0%    /devices<br />
ctfs                       0       0       0     0%    /system/contract<br />
proc                       0       0       0     0%    /proc<br />
mnttab                     0       0       0     0%    /etc/mnttab<br />
swap                 52004096    1024 52003072     1%    /etc/svc/volatile<br />
objfs                      0       0       0     0%    /system/object<br />
fd                         0       0       0     0%    /dev/fd<br />
swap                 52003072       0 52003072     0%    /tmp<br />
swap                 52003128      56 52003072     1%    /var/run<br />
testz2               104251392      26 99863897     1%    /testb<br />
testz2/data          25165824 4387339 20778485    18%    /testb/data<br />
testz1               104251392      25 99863571     1%    /move<br />
testz1/data          25165824 4387627 20778197    18%    /move/data</p>
<p>Move new files onto the old mount.<br />
nj11mhf0016$ sudo zfs set mountpoint=/testa testz2</p>
<p>nj11mhf0016$ df -k<br />
Filesystem            kbytes    used   avail capacity  Mounted on<br />
/dev/dsk/c0t0d0s0    108126717 6000558 101044892     6%    /<br />
/devices                   0       0       0     0%    /devices<br />
ctfs                       0       0       0     0%    /system/contract<br />
proc                       0       0       0     0%    /proc<br />
mnttab                     0       0       0     0%    /etc/mnttab<br />
swap                 51995568    1024 51994544     1%    /etc/svc/volatile<br />
objfs                      0       0       0     0%    /system/object<br />
fd                         0       0       0     0%    /dev/fd<br />
swap                 51994544       0 51994544     0%    /tmp<br />
swap                 51994600      56 51994544     1%    /var/run<br />
testz1               104251392      25 99863571     1%    /move<br />
testz1/data          25165824 4387627 20778197    18%    /move/data<br />
testz2               104251392      26 99863838     1%    /testa<br />
testz2/data          25165824 4387339 20778485    18%    /testa/data</p>
<p># Verify that everything is ok and the same.</p>
<p># Remove the move pool.<br />
nj11mhf0016$ sudo zfs destroy -r testz1<br />
nj11mhf0016$ sudo zpool destroy testz1</p>
<p>nj11mhf0016$ df -k<br />
Filesystem            kbytes    used   avail capacity  Mounted on<br />
/dev/dsk/c0t0d0s0    108126717 6000557 101044893     6%    /<br />
/devices                   0       0       0     0%    /devices<br />
ctfs                       0       0       0     0%    /system/contract<br />
proc                       0       0       0     0%    /proc<br />
mnttab                     0       0       0     0%    /etc/mnttab<br />
swap                 51977088    1024 51976064     1%    /etc/svc/volatile<br />
objfs                      0       0       0     0%    /system/object<br />
fd                         0       0       0     0%    /dev/fd<br />
swap                 51976064       0 51976064     0%    /tmp<br />
swap                 51976120      56 51976064     1%    /var/run<br />
testz2               104251392      26 99863838     1%    /testa<br />
testz2/data          25165824 4387339 20778485    18%    /testa/data</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Flosbyers.com%2Fwordpress%2F2009%2F12%2Fprocedure-to-swap-zfs-pools-solaris%2F&amp;title=Procedure%20to%20swap%20ZFS%20pools%20Solaris" id="wpa2a_20"><img src="http://losbyers.com/wordpress/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://losbyers.com/wordpress/2009/12/procedure-to-swap-zfs-pools-solaris/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

