<?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>SHOCM &#187; CLI</title>
	<atom:link href="http://www.shocm.com/tag/cli/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.shocm.com</link>
	<description>Open Source, Cloud, Scotch, Baseball, Family, and Programming since the 1900&#039;s</description>
	<lastBuildDate>Fri, 27 Apr 2012 15:24:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>Fun with SAY</title>
		<link>http://www.shocm.com/2008/07/fun-with-say/</link>
		<comments>http://www.shocm.com/2008/07/fun-with-say/#comments</comments>
		<pubDate>Mon, 21 Jul 2008 15:47:05 +0000</pubDate>
		<dc:creator>Shocm</dc:creator>
				<category><![CDATA[Funny]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[OSX]]></category>
		<category><![CDATA[CLI]]></category>
		<category><![CDATA[commandline]]></category>

		<guid isPermaLink="false">http://www.vanjohnson.com/?p=166</guid>
		<description><![CDATA[<p>Sometimes it&#8217;s the simple things that amaze people and leave them thinking you are some type of computer genius. My daughters have grown up with computers, and I mean hardcore. Their first computer was a SUSE Linux machine; they&#8217;ve worked on Windows and OS X boxes and they know their way around them all. At [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes it&#8217;s the simple things that amaze people and leave them thinking you are some type of computer genius. My daughters have grown up with computers, and I mean hardcore. Their first computer was a SUSE Linux machine; they&#8217;ve worked on Windows and OS X boxes and they know their way around them all. At 10 years old, they&#8217;ve taken over the IT tech support duties for my wife. Next, I am going to install a phone line in their room so other family members can call them when they need help. What I am trying to say is, their Dad&#8217;s vast knowledge of computers doesn&#8217;t impress them. Whenever I think I&#8217;m showing them something new and cool on the computer, they have an attitude of &#8220;huh, I just didn&#8217;t know how to do it, now I do and its not that cool&#8221;.</p>
<p>I myself get kind of like that too, I am pretty hardcore geek and bells and whistles on computers don&#8217;t really impress me. I typically look at things on a much deeper level. That&#8217;s why when I read an article sometime back called &#8220;<a href="http://fidel.vido.info/wordpress/2008/06/26/mac-having-fun-with-the-say-command-in-your-terminal/">Having fun with the SAY command in your Terminal</a>&#8221; I thought to myself, &#8220;Cute&#8221; and filed it away in the back of my mind thinking I will never have a use for that command.</p>
<p>The SAY command on OS X is a Speech Synthesis Manager. If you own an OS X machine, open a terminal window and type &#8220;man say&#8221; (minus the quotes) for more information, or just type &#8220;say Hello. do you want to play a game&#8221; and start having fun with it.</p>
<p>One day, one of my daughters and I were having somewhat of a disagreement on if it was more important for her to clean her room or finish watching TV; guess which side I was on. As privileges started to get stripped away, right after &#8220;no more pool time&#8221; but before &#8220;no more Playstation3 time&#8221;, she stomps off into her room. Knowing she wasn&#8217;t in her room doing what was asked of her, and knowing I was probably too mad myself to try to talk to her, I sat at my laptop tapping the space bar. Then it dawned on me; I fired up a terminal session on my Ubuntu laptop and made a ssh connection to my daughter&#8217;s computer in her room and proceeded to test out that SAY command. It went something like this;</p>
<blockquote><p>say Why are you so mad</p></blockquote>
<p>I hear a deep synthetic voice mumble come from behind my daughters&#8217; door followed by a somewhat confused sounding voice of a little girl.</p>
<blockquote><p>say Didnt your dad ask you to clean your room? I like a clean room</p></blockquote>
<p>Some more little girl mumbles. Is she arguing with the computer now?</p>
<blockquote><p>say Your dad is probably the smartest man I know, and may be the smartest man on earth, you should listen to him</p></blockquote>
<p>OK, that last one might have been too much and may have tipped her off. I hear her door open and she yells, &#8220;I don&#8217;t know how you are doing that but you better show me&#8221;</p>
<p>Anyways, SSH with SAY and you can have all sorts of fun with co-workers, family, and friends. Further more they will think you are truly <a href="http://www.urbandictionary.com/define.php?term=1337">1337</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.shocm.com/2008/07/fun-with-say/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Backup files with tar</title>
		<link>http://www.shocm.com/2003/10/backup-files-with-tar/</link>
		<comments>http://www.shocm.com/2003/10/backup-files-with-tar/#comments</comments>
		<pubDate>Fri, 10 Oct 2003 21:30:57 +0000</pubDate>
		<dc:creator>Shocm</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Backups]]></category>
		<category><![CDATA[CLI]]></category>
		<category><![CDATA[commandline]]></category>
		<category><![CDATA[Restore]]></category>

		<guid isPermaLink="false">http://www.vanjohnson.com/?p=12</guid>
		<description><![CDATA[<p>[NOTE]<br /> I don&#8217;t remember where I got this article from but it is full of some good information<br /> [/NOTE]</p> <p>TAR is the Unix Tape ARchive utility. It can be used to either store data on a streaming tape device like a DAT drive, or store files in what is commonly called a tarball [...]]]></description>
			<content:encoded><![CDATA[<p>[NOTE]<br />
I don&#8217;t remember where I got this article from but it is full of some good information<br />
[/NOTE]</p>
<p>TAR is the Unix Tape ARchive utility. It can be used to either store data on a streaming tape device like a DAT drive, or store files in what is commonly called a tarball file- somewhat like a pkzip file, only compression is optional.</p>
<p><strong>[The basics]</strong></p>
<p>In these examples, I will use the following file structure: a top level directory called DIR1 containing the files picture.jpg, document.doc and database.db.</p>
<p>DIR1/<br />
DIR1/picture.jpg<br />
DIR1/document.doc<br />
DIR1/database.db</p>
<p><strong>[Creating a tarball]</strong></p>
<p>If we were in the directory DIR1 and wanted to backup all the files to a tarball called backup.tar, we could issue this command:</p>
<p>$ tar cvf backup.tar .<br />
./<br />
picture.jpg<br />
doucment.doc<br />
database.db<br />
tar: backup.tar is the archive; not dumped</p>
<p>Note:<br />
c=create (an archive)<br />
v=verbose (just because)<br />
f=filename (the name of our tarball)<br />
.=current directory (what&#8217;s going to be backed up)</p>
<p>Also worth mentioning is that by default tar is recursive- meaning it will back up all files and subdirectories recursively unless you otherwise specify with the n flag (non-recursive)</p>
<p><strong>[Displaying the Contents of a Tarball]</strong></p>
<p>The current directory will now contain a file called backup.tar. To display the contents of the tarball file, we could issue this command:</p>
<p>$ tar tvf backup.tar<br />
drwxr-xr-x root/gci 0 Jun 29 10:10 ./<br />
-rw-r&#8211;r&#8211; root/gci 1 Jun 29 10:10 picture.jpg<br />
-rw-r&#8211;r&#8211; root/gci 1 Jun 29 10:10 document.doc<br />
-rw-r&#8211;r&#8211; root/gci 1 Jun 29 10:10 databse.db<br />
<span id="more-12"></span></p>
<p>Note:<br />
t=table of contents (list)<br />
v=verbose (display all info)<br />
f=filename (backup.tar)</p>
<p>[Extracting Data from a Tarball]<br />
To extract the entire contents of the tarball to the current directory, we can type:<br />
$ tar xvf backup.tar<br />
./<br />
picture.jpg<br />
doucment.doc<br />
database.db</p>
<p>Note:<br />
x=extract<br />
v=verbose<br />
f=filename (backup.tar)</p>
<p>To extract only the picture.jpg file from the archive, type the following command:</p>
<p>$ tar xvf backup.tar picture.jpg</p>
<p>Alternatively, you can use wild cards in either the creation or extraction of a tarball. To extract all jpg files from our archive, we can use a command like this:</p>
<p>$ tar xvf backup.tar *.jpg<br />
<strong><br />
[Using Compression]</strong></p>
<p>If you would also like to add compression to your tarballs, you can combine the gzip utility with tar on the command line by adding the z switch to the command. Usually when this is done, we change the suffix of our tarball filename from .tar to either .tgz or .tar.gz. This will let whoever sees the file know that it is a gzipped tarball.</p>
<p>$ tar zcvf tarball.tgz .</p>
<p>Note:<br />
z=gzip compression<br />
c=create<br />
v=verbose<br />
f=filename (backup.tgz)<br />
.=current directory (what to backup)</p>
<p><strong>[Permissions with tar]</strong></p>
<p>If you would like to preserve the permissions of the files you backup, use the p option with the tar command. This will save the uid, gid as well as the specific permission attributes of the files (read, write, execute etc.)</p>
<p>$ tar pzcvf tarball.tgz .</p>
<p>You should also use the p option with the tar extraction command:</p>
<p>$ tar pxvf tarball.tgz .</p>
]]></content:encoded>
			<wfw:commentRss>http://www.shocm.com/2003/10/backup-files-with-tar/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

