<?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>dasspunk.com &#187; Unix</title>
	<atom:link href="http://dasspunk.com/category/Unix/feed/" rel="self" type="application/rss+xml" />
	<link>http://dasspunk.com</link>
	<description>Dasspunk - blather and bluegrass</description>
	<lastBuildDate>Thu, 08 Dec 2011 18:14:03 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Regular Expression Examples</title>
		<link>http://dasspunk.com/2008/regular-expression-examples/</link>
		<comments>http://dasspunk.com/2008/regular-expression-examples/#comments</comments>
		<pubDate>Mon, 10 Nov 2008 17:20:42 +0000</pubDate>
		<dc:creator>dasspunk</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://dasspunk.com/2008/regular-expression-examples/</guid>
		<description><![CDATA[I regularly find myself in need of regular expressions. Google is of course helpful for these but since Slashdot has a nice article throwing them out there for me, I figure I&#8217;ll grab some here for quick access: IP Address:/^((25[0-5]&#124;2[0-4][0-9]&#124;1[0-9][0-9]&#124;[1-9][0-9]&#124;[0-9])\.){3}(25[0-5]&#124;2[0-4][0-9]&#124;1[0-9][0-9]&#124;[1-9][0-9]&#124;[0-9])$/ Mac Address: /^[0-9a-fA-F]{2}:[0-9a-fA-F]{2}:[0-9a-fA-F]{2}:[0-9a-fA-F]{2}:[0-9a-fA-F]{2}:[0-9a-fA-F]{2}$/ RFC Compliant Email Address:([^\\x00-\\x20\\x22\\x28\\x29\\x2c\\x2e\\x3a-\\x3c\\x3e\\x40\\x5b-\\x5d\\x7f-\\xff]+&#124;\\x22([^\\x0d\\x22\\x5c\\x80-\\xff]&#124;\\x5c[\\x00-\\x7f])*\\x22)(\\x2e([^\\x00-\\x20\\x22\\x28\\x29\\x2c\\x2e\\x3a-\\x3c\\x3e\\x40\\x5b-\\x5d\\x7f-\\xff]+&#124;\\x22([^\\x0d\\x22\\x5c\\x80-\\xff]&#124;\\x5c\\x00-\\x7f)*\\x22))*\\x40([^\\x00-\\x20\\x22\\x28\\x29\\x2c\\x2e\\x3a-\\x3c\\x3e\\x40\\x5b-\\x5d\\x7f-\\xff]+&#124;\\x5b([^\\x0d\\x5b-\\x5d\\x80-\\xff]&#124;\\x5c[\\x00-\\x7f])*\\x5d)(\\x2e([^\\x00-\\x20\\x22\\x28\\x29\\x2c\\x2e\\x3a-\\x3c\\x3e\\x40\\x5b-\\x5d\\x7f-\\xff]+&#124;\\x5b([^\\x0d\\x5b-\\x5d\\x80-\\xff]&#124;\\x5c[\\x00-\\x7f])*\\x5d))* SSN:^(?!000)([0-6]\d{2}&#124;7([0-6]\d&#124;7[012]))([ -]?)(?!00)\d\d\3(?!0000)\d{4}$ US phone with or without parentheses^\([0-9]{3}\)\s?[0-9]{3}(-&#124;\s)?[0-9]{4}$&#124;^[0-9]{3}-?[0-9]{3}-?[0-9]{4}$ [...]]]></description>
			<content:encoded><![CDATA[<p>I regularly find myself in need of regular expressions. Google is of course helpful for these but since Slashdot has a nice article throwing them out there for me, I figure I&#8217;ll grab some here for quick access:</p>
<p>
IP Address:<br /><code>/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/ </code></p>
<p>Mac Address:<br /><code><br />
/^[0-9a-fA-F]{2}:[0-9a-fA-F]{2}:[0-9a-fA-F]{2}:[0-9a-fA-F]{2}:[0-9a-fA-F]{2}:[0-9a-fA-F]{2}$/</code><br />
<span id="more-379"></span></p>
<p><a href="http://www.iamcal.com/publish/articles/php/parsing_email/">RFC Compliant Email Address:</a><br /><code>([^\\x00-\\x20\\x22\\x28\\x29\\x2c\\x2e\\x3a-\\x3c\\x3e\\x40\\x5b-\\x5d\\x7f-\\xff]+|\\x22([^\\x0d\\x22\\x5c\\x80-\\xff]|\\x5c[\\x00-\\x7f])*\\x22)(\\x2e([^\\x00-\\x20\\x22\\x28\\x29\\x2c\\x2e\\x3a-\\x3c\\x3e\\x40\\x5b-\\x5d\\x7f-\\xff]+|\\x22([^\\x0d\\x22\\x5c\\x80-\\xff]|\\x5c\\x00-\\x7f)*\\x22))*\\x40([^\\x00-\\x20\\x22\\x28\\x29\\x2c\\x2e\\x3a-\\x3c\\x3e\\x40\\x5b-\\x5d\\x7f-\\xff]+|\\x5b([^\\x0d\\x5b-\\x5d\\x80-\\xff]|\\x5c[\\x00-\\x7f])*\\x5d)(\\x2e([^\\x00-\\x20\\x22\\x28\\x29\\x2c\\x2e\\x3a-\\x3c\\x3e\\x40\\x5b-\\x5d\\x7f-\\xff]+|\\x5b([^\\x0d\\x5b-\\x5d\\x80-\\xff]|\\x5c[\\x00-\\x7f])*\\x5d))*</code></p>
<p>SSN:<br /><code>^(?!000)([0-6]\d{2}|7([0-6]\d|7[012]))([ -]?)(?!00)\d\d\3(?!0000)\d{4}$ </code></p>
<p>US phone with or without parentheses<br /><code>^\([0-9]{3}\)\s?[0-9]{3}(-|\s)?[0-9]{4}$|^[0-9]{3}-?[0-9]{3}-?[0-9]{4}$ </code></p>
<p>ISO Date (19th to 21st century only)<br /><code>^((18|19|20)\d\d)-(0[1-9]|1[012])-(0[1-9]|1[0-9]|2[0-9]|3[01])$</code></p>
<p>Misc:<br /><code>^[A-Z]+ # starts with at least one capital letter<br />
\s? # followed by an optional space<br />
\d+ # followed by one or more digits /x<br />
^\d+ # starts with one or more digits<br />
\. # followed by a single decimal /x<br />
\d+ # starts with one or more digits<br />
\s # and a space /x<br />
Thesis # starts with "Thesis" .+ # with one or more characters of any kind<br />
\d{4} # then four numbers - year<br />
\s+ # separated by at least one space<br />
[A-Z]+ # from one or more capital letters<br />
\d+ # followed by one or more numbers /xi # case ignored here in case we run into THESIS or thesis<br />
\d+ # starts with one or more digits<br />
\- # connected with a dash<br />
\d+ # to one or more following digits /x<br />
\d+ # starts with one or more digits<br />
  # followed by a space<br />
[A-Z]* #followed by zero or more capital letters<br />
\d+ # followed by one or more digits /x<br /></code></p>
]]></content:encoded>
			<wfw:commentRss>http://dasspunk.com/2008/regular-expression-examples/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My favorite tcpdump options</title>
		<link>http://dasspunk.com/2002/my-favorite-tcpdump-options/</link>
		<comments>http://dasspunk.com/2002/my-favorite-tcpdump-options/#comments</comments>
		<pubDate>Fri, 06 Sep 2002 11:45:05 +0000</pubDate>
		<dc:creator>dasspunk</dc:creator>
				<category><![CDATA[Mac]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">/?p=54</guid>
		<description><![CDATA[I&#8217;m always forgetting which options get me the output I like from tcpdump so I&#8217;m posting it here for all to see. This line gets close to the output of EetherPeek that I always liked but costs about $500 less. Here it is: tcpdump -vvv -i en0 -X -s 0 Here&#8217;s a breakdown for what [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m always forgetting which options get me the output I like from tcpdump so I&#8217;m posting it here for all to see. This line gets close to the output of EetherPeek that I always liked but costs about $500 less. Here it is:</p>
<p>
<code>tcpdump -vvv -i en0 -X -s 0</code></p>
<p>
Here&#8217;s a breakdown for what it does:</p>
<ul>
<li>&#8220;-vvv&#8221; Turns on uber-verbose mode giving the most information</li>
<li>&#8220;-i en0&#8243; sets the device to listen on (in this case the first ethernet card)</li>
<li>&#8220;-X&#8221; prints hex <i>and</i> any ascii text (human readable)</li>
<li>&#8220;-s 0&#8243; grabs the entire packet (or <i>n</i> bytes if not 0)</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://dasspunk.com/2002/my-favorite-tcpdump-options/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why you should be using scp&#8230;</title>
		<link>http://dasspunk.com/2002/why-you-should-be-using-scp/</link>
		<comments>http://dasspunk.com/2002/why-you-should-be-using-scp/#comments</comments>
		<pubDate>Wed, 21 Aug 2002 17:11:58 +0000</pubDate>
		<dc:creator>dasspunk</dc:creator>
				<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">/?p=48</guid>
		<description><![CDATA[What is scp? Scp (secure copy) is a program that is part of the ssh (secure shell) package and is used to securely copy data from, to or between remote computers. All data transferred via scp is encrypted, including your user name and password. If you run OS X, you already have it on your [...]]]></description>
			<content:encoded><![CDATA[<p>What is scp?</p>
<p>Scp (secure copy) is a program that is part of the ssh (secure shell) package and is used to securely copy data from, to or between remote computers. All data transferred via scp is encrypted, including your user name and password. If you run OS X, you already have it on your machine, just fire up terminal and go. If you are on another Unix or Linux, you may need to install it.</p>
<p><div class="textwhite">Why should I be using scp?</div>
<p>The only people who ask this question are those who don&#8217;t realize just how easy it is to &#8220;eavesdrop&#8221; on other people&#8217;s computer connections. Suffice to say, it is <i>extremely</i> easy to do and you should be worried. If you are set on using ftp to transfer your files you can use sftp which is also part of the ssh package. Scp isn&#8217;t necicarily a replacement for ftp (although it certainly can be) but it can be less cumbersome in many applications (such as quickly uploading a file).</p>
<p><span id="more-48"></span></p>
<p><div class="textwhite">How does it work?</div>
<p>Simple. Invoke the program, tell it what you want to copy and then where you want to copy it. Eg.</p>
<p><div class="textwhite">Example 1</div>
<p><code>scp ~/myFile.txt username@myserver.com:~/path</code></p>
<p>
Here we are copying a local file named &#8220;myFile.txt&#8221; to a remote server with a user name &#8220;username&#8221; on the remote server &#8220;myserver.com&#8221; in the folder &#8220;~/path&#8221;. The two important things to note here are the &#8220;@&#8221; and &#8220;:&#8221; characters. The &#8220;@&#8221; specifies this user account residing &#8220;at&#8221; this server name. The &#8220;:&#8221; specifies that everything here after is to be considered the path to where you want this copied. Scp will not work without these characters and you will get errors.</p>
<p><div class="textwhite">Example 2</div>
<p><code>scp -r username@myserver.com:~/picturesFolder /tmp</code></p>
<p>
Here, we use the &#8220;-r&#8221; option to copy an entire folder recursively. In this instance, the folder we are copying is a remote file on a server named &#8220;myserver&#8221;.
</p>
<p>Scp is an easy and safe way to transfer files and folders and you should be using it whenever possible. For more information, check the scp manpage.</p>
]]></content:encoded>
			<wfw:commentRss>http://dasspunk.com/2002/why-you-should-be-using-scp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

