<?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>PoundBangWhack.com &#187; Command-Line</title>
	<atom:link href="http://www.poundbangwhack.com/tag/command-line/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.poundbangwhack.com</link>
	<description>A web development/programming blog providing info, tips, and tricks on programming languages, scripting, Linux, MySQL and more</description>
	<lastBuildDate>Sat, 17 Jul 2010 05:17:56 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Cheat Sheets</title>
		<link>http://www.poundbangwhack.com/cheat-sheets/</link>
		<comments>http://www.poundbangwhack.com/cheat-sheets/#comments</comments>
		<pubDate>Mon, 29 Jun 2009 05:45:45 +0000</pubDate>
		<dc:creator>Mark Stoecker</dc:creator>
				<category><![CDATA[Other]]></category>
		<category><![CDATA[Cheat Sheet]]></category>
		<category><![CDATA[Command-Line]]></category>
		<category><![CDATA[find]]></category>
		<category><![CDATA[grep]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[RegExp]]></category>
		<category><![CDATA[Regular Expression]]></category>
		<category><![CDATA[rpm]]></category>
		<category><![CDATA[sed]]></category>
		<category><![CDATA[tar]]></category>
		<category><![CDATA[vi]]></category>
		<category><![CDATA[yum]]></category>

		<guid isPermaLink="false">http://www.poundbangwhack.com/?page_id=845</guid>
		<description><![CDATA[This page will house all the Cheat Sheats that I have written.  If you have a request for a cheat sheet that you would like to see, or changes to an existing cheat sheet, you can email me at admin[at]poundbangwhack.com.  


vi/vim Cheat Sheet
Cheat Sheet for the vi/vim command-line text editor for Linux


grep Cheat [...]]]></description>
			<content:encoded><![CDATA[<p>This page will house all the Cheat Sheats that I have written.  If you have a request for a cheat sheet that you would like to see, or changes to an existing cheat sheet, you can email me at admin[at]poundbangwhack.com.  </p>
<p><span id="more-845"></span></p>
<div class="script">
<h3><a href="http://www.poundbangwhack.com/cheat-sheets/vi/">vi/vim Cheat Sheet</a></h3>
<p class="description">Cheat Sheet for the vi/vim command-line text editor for Linux</p>
</div>
<div class="script">
<h3><a href="http://www.poundbangwhack.com/cheat-sheets/grep/">grep Cheat Sheet</a></h3>
<p class="description">Cheat Sheet for the Linux regular expression pattern matching function grep</p>
</div>
<div class="script">
<h3><a href="http://www.poundbangwhack.com/cheat-sheets/find/">find Cheat Sheet</a></h3>
<p class="description">Cheat Sheet for the Linux file/directory matching function find</p>
</div>
<div class="script">
<h3><a href="http://www.poundbangwhack.com/cheat-sheets/sed/">sed Cheat Sheet</a></h3>
<p class="description">Cheat Sheet for Linux function sed for filtering and transforming text</p>
</div>
<div class="script">
<h3><a href="http://www.poundbangwhack.com/cheat-sheets/regular-expressions/">Regular Expressions (regexp) Cheat Sheet</a></h3>
<p class="description">Regular Expressions Cheat Sheet</p>
</div>
<div class="script">
<h3><a href="http://www.poundbangwhack.com/cheat-sheets/tar/">tar Cheat Sheet</a></h3>
<p class="description">Cheat Sheet for Linux tar file/directory compression command</p>
</div>
<div class="script">
<h3><a href="http://www.poundbangwhack.com/cheat-sheets/rpm/">rpm Cheat Sheet</a></h3>
<p class="description">Cheat Sheet for Linux rpm (RPM Package Manager) command for software installation/upgrades</p>
</div>
<div class="script">
<h3><a href="http://www.poundbangwhack.com/cheat-sheets/yum/">yum Cheat Sheet</a></h3>
<p class="description">Cheat Sheet for Linux yum (Yellow dog Updater, Modified) command for software installation/upgrades</p>
</div>
<div class="script">
<h3><a href="http://www.poundbangwhack.com/cheat-sheets/ftp/">ftp Cheat Sheet</a></h3>
<p class="description">Cheat Sheet for command line ftp for Linux</p>
</div>
<div class="script">
<h3><a href="http://www.poundbangwhack.com/cheat-sheets/bash-scripting/">bash Scripting Cheat Sheet</a></h3>
<p class="description">Cheat Sheet for writing bash scripts in Linux</p>
</div>
<div class="script">
<h3><a href="http://www.poundbangwhack.com/cheat-sheets/miscellaneous-ssh-commands/">Miscellaneous SSH Commands Cheat Sheet</a></h3>
<p class="description">A collection of useful miscellaneous SSH commands</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.poundbangwhack.com/cheat-sheets/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Post to Twitter</title>
		<link>http://www.poundbangwhack.com/scripts/shell/post-to-twitter/</link>
		<comments>http://www.poundbangwhack.com/scripts/shell/post-to-twitter/#comments</comments>
		<pubDate>Fri, 19 Jun 2009 23:07:36 +0000</pubDate>
		<dc:creator>Mark Stoecker</dc:creator>
				<category><![CDATA[Other]]></category>
		<category><![CDATA[Command-Line]]></category>
		<category><![CDATA[curl]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[SSH]]></category>
		<category><![CDATA[Twitter]]></category>

		<guid isPermaLink="false">http://www.poundbangwhack.com/?page_id=789</guid>
		<description><![CDATA[This is my first Shell script for public release.  Twitter is blocked at my workplace so this script allows me to use cURL and the Twitter API to post from the shell of my server.  
The script requires only one variable in the configuration which is your username.  You are prompted for [...]]]></description>
			<content:encoded><![CDATA[<p>This is my first Shell script for public release.  Twitter is blocked at my workplace so this script allows me to use cURL and the Twitter <acronym title="Application Programming Interface">API</acronym> to post from the shell of my server.  </p>
<p>The script requires only one variable in the configuration which is your username.  You are prompted for your password each time you run the script to tweet.  If you have a url you would like to share, the script will connect to the <a href="http://is.gd" target="_blank">is.gd</a> <acronym title="Application Programming Interface">API</acronym> to shorten the URL.  The script will then subtract the length of the shortened url from the 140 total, as well as the space required to retweet (<em>RT @username</em>) the message for a total length available for the tweet.  If you go beyond this length, you will be notified how far over you&#8217;ve gone.  The script then sends the tweet via cURL with your message followed by the shortened URL at the end.  </p>
<h3>Information</h3>
<ul class="no-bullet">
<li>
<table class="script-info" cellpadding="0">
<tr>
<th>@name</th>
<td>Post to Twitter</td>
</tr>
<tr>
<th>@filename</th>
<td>post_to_twitter.sh</td>
</tr>
<tr>
<th>@description</th>
<td>This script will post to your twitter account from a Linux shell.  You will need to enter your username in the configuration section.  You will be prompted for your password each time you run the script.</td>
</tr>
<tr>
<th>@author</th>
<td>Mark Stoecker</td>
</tr>
<tr>
<th>@version</th>
<td>0.1</td>
</tr>
</table>
</li>
</ul>
<h3>Installation:</h3>
<ul class="no-bullet">
<li><a href="http://www.poundbangwhack.com/scripts_source/shell/post_to_twitter.sh.txt" onclick="javascript: pageTracker._trackPageview('/downloads/shell/post-to-twitter');">Click here to download this script</a></li>
<li>You can also download this through your Linux shell with the command: <code>wget http://www.poundbangwhack.com/scripts_source/shell/post_to_twitter.sh.txt</code></li>
<li>Once downloaded, upload the file to the home directory of your server/computer and save it with a .sh extension: <code>mv ~/post_to_twitter.sh.txt ~/post_to_twitter.sh</code></li>
<li>Add execute permissions to the script with <code>chmod a+x ~/post_to_twitter.sh</code></li>
<li>Run the script with the command <code>~/post_to_twitter.sh</code></li>
</ul>
<h3>Configuration:</h3>
<ul class="no-bullet">
<li>Open the script in any text editor and edit the line <code>u=""</code> by adding your Twitter username between the quotes.</li>
</ul>
<h3>Bugs:</h3>
<ul class="no-bullet">
<li>No known bugs at this time</li>
</ul>
<h3>To Do:</h3>
<ul>
<li>Nothing to do at this time</li>
</ul>
<p>As always, if you have comments or suggestions, please share them below and they may be included in future versions of the script.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.poundbangwhack.com/scripts/shell/post-to-twitter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Shell Scripts</title>
		<link>http://www.poundbangwhack.com/scripts/shell/</link>
		<comments>http://www.poundbangwhack.com/scripts/shell/#comments</comments>
		<pubDate>Fri, 19 Jun 2009 23:05:55 +0000</pubDate>
		<dc:creator>Mark Stoecker</dc:creator>
				<category><![CDATA[Other]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[Command-Line]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[SSH]]></category>

		<guid isPermaLink="false">http://www.poundbangwhack.com/?page_id=788</guid>
		<description><![CDATA[This page will house the Shell Scripts that I have developed. Shell scripts are run from a Linux Command-line or SSH interface.

Post to Twitter
Update your Twitter account from the shell

]]></description>
			<content:encoded><![CDATA[<p>This page will house the Shell Scripts that I have developed. Shell scripts are run from a <strong>Linux Command-line or <acronym title="Secure Shell">SSH</acronym></strong> interface.</p>
<div class="script">
<h3><a href="http://www.poundbangwhack.com/shell/post-to-twitter/">Post to Twitter</a></h3>
<p class="description">Update your Twitter account from the shell</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.poundbangwhack.com/scripts/shell/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Post to Twitter from a Linux Shell</title>
		<link>http://www.poundbangwhack.com/2009/06/18/how-to-post-to-twitter-from-a-linux-shell/</link>
		<comments>http://www.poundbangwhack.com/2009/06/18/how-to-post-to-twitter-from-a-linux-shell/#comments</comments>
		<pubDate>Thu, 18 Jun 2009 23:08:59 +0000</pubDate>
		<dc:creator>Mark Stoecker</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[How To]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[SSH/Command Line]]></category>
		<category><![CDATA[Shell Scripts]]></category>
		<category><![CDATA[Twitter]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[Command-Line]]></category>
		<category><![CDATA[SSH]]></category>

		<guid isPermaLink="false">http://www.poundbangwhack.com/?p=784</guid>
		<description><![CDATA[I had a little downtime today at work and decided to write a shell script that I could use to tweet from the shell of my Linux server.  The reason is that Twitter is one of many social networking sites that is blocked at my workplace.  However, I do have access to my [...]]]></description>
			<content:encoded><![CDATA[<p>I had a little downtime today at work and decided to write a shell script that I could use to tweet from the shell of my Linux server.  The reason is that <strong>Twitter is one of many social networking sites</strong> that is blocked at my workplace.  However, I do have access to my server and <a href="http://www.commandlinefu.com/commands/view/176/update-twitter-via-curl" target="_blank">found a great one-liner on commandlinefu.com to update twitter via curl</a>.  I decided to expand on this a bit and wrote a shell script that offers a bit more than merely posting a tweet.  <a href="http://www.poundbangwhack.com/shell/post-to-twitter/">Check out my shell script to post to Twitter here.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.poundbangwhack.com/2009/06/18/how-to-post-to-twitter-from-a-linux-shell/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What is the Difference Between RPM and YUM?</title>
		<link>http://www.poundbangwhack.com/2009/05/21/what-is-the-difference-between-rpm-and-yum/</link>
		<comments>http://www.poundbangwhack.com/2009/05/21/what-is-the-difference-between-rpm-and-yum/#comments</comments>
		<pubDate>Thu, 21 May 2009 23:20:03 +0000</pubDate>
		<dc:creator>Mark Stoecker</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Command-Line]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[Gnome]]></category>
		<category><![CDATA[KDE]]></category>
		<category><![CDATA[Mandriva]]></category>
		<category><![CDATA[Red Hat]]></category>
		<category><![CDATA[RHEL]]></category>
		<category><![CDATA[rpm]]></category>
		<category><![CDATA[SSH]]></category>
		<category><![CDATA[SUSE]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Yellow Dog]]></category>
		<category><![CDATA[yum]]></category>

		<guid isPermaLink="false">http://www.poundbangwhack.com/?p=215</guid>
		<description><![CDATA[Both RPM, "RPM Package Manager" (formerly "Red Hat Package Manager"), and YUM, "Yellow dog Updater, modified", are Linux package management systems.  Package management systems are often confused with installers.  The following table details the main differences between a package management system and an installer:
<table border="1" cellspacing="0" id="difftable">
<tbody>
<tr>
<th >Package Management System</th>
<th>Installer</th>
</tr>
<tr>
<td>Typically part of the operating system.</td>
<td>Each product comes bundled with its own installer.</td>
</tr>
<tr>
<td>Uses a single installation database.</td>
<td>Performs its own installation, sometimes recording information about that installation in a registry.</td>
</tr>
<tr>
<td>Can verify and manage all packages on the system.</td>
<td>Only works with its bundled product.</td>
</tr>
<tr>
<td>Single package management system vendor.</td>
<td>Multiple installer vendors.</td>
</tr>
<tr>
<td>Single package format.</td>
<td>Multiple installation formats.</td>
</tr>
</tbody></table>
<span id="reference">Above table provided by <a href="http://en.wikipedia.org/wiki/Package_management_system" target="_blank">Wikipedia</a></span>]]></description>
			<content:encoded><![CDATA[<p>Anyone who is familiar with just about any Linux distribution has had to install software at some point or another.  If it&#8217;s a process you&#8217;re not familiar with, what&#8217;s the first thing you do?  You turn to Google of course (or <a href="http://scour.com/invite/mstoecker">Scour</a>).  Inevitably you have come across an article instruction you to install the software with the <span class="pre">RPM</span> command, while another one tells you how to do it with the <span class="pre">YUM</span> command.  The question then comes up:</p>
<blockquote><p>What&#8217;s the difference between installing software using RPM vs. YUM?</p></blockquote>
<p><span id="more-215"></span><br />
As long as the software works, it doesn&#8217;t matter right?  Well, for those of you obsessive-compulsive types, I feel your pain.  Not only do I want it to work, but I want to know why.  So I decided to take it upon myself to answer this question and share my findings.</p>
<p>Both RPM, &#8220;RPM Package Manager&#8221; (formerly &#8220;Red Hat Package Manager&#8221;), and YUM, &#8220;Yellow dog Updater, modified&#8221;, are Linux package management systems.  Package management systems are often confused with installers.  The following table details the main differences between a package management system and an installer:</p>
<table border="1" cellspacing="0" id="difftable">
<tbody>
<tr>
<th >Package Management System</th>
<th>Installer</th>
</tr>
<tr>
<td>Typically part of the operating system.</td>
<td>Each product comes bundled with its own installer.</td>
</tr>
<tr>
<td>Uses a single installation database.</td>
<td>Performs its own installation, sometimes recording information about that installation in a registry.</td>
</tr>
<tr>
<td>Can verify and manage all packages on the system.</td>
<td>Only works with its bundled product.</td>
</tr>
<tr>
<td>Single package management system vendor.</td>
<td>Multiple installer vendors.</td>
</tr>
<tr>
<td>Single package format.</td>
<td>Multiple installation formats.</td>
</tr>
</tbody>
</table>
<p><span id="reference">Above table provided by <a href="http://en.wikipedia.org/wiki/Package_management_system" target="_blank">Wikipedia</a></span></p>
<p>Based on the above table, you can see that a package management system is it&#8217;s own piece of software that is often bundled with the OS, whereas an installer is bundled with each individual piece of software.</p>
<p>RPM is a pretty straightforward utility.  Per the RPM <abbr title="manual page">man page</abbr>,</p>
<blockquote><p>RPM is  a powerful Package Manager, which can be used to build, install, query, verify, update, and erase individual software packages.</p></blockquote>
<p>In additiona, rpm can also be used to verify the digital signature of the packages you are installing to verify it has not been changed.  RPM was originally developed for Red Hat Linux, but now is shipped with many Linux distributions including Fedora, Mandriva, <abbr title="Red Hat Enterprise Linux">RHEL</abbr>, SUSE, CentOS, Yellow Dog, and more (not Ubuntu, sorry).</p>
<p>YUM is honestly not much different from RPM.  From the YUM <abbr title="manual page">man page</abbr>,</p>
<blockquote><p>YUM is an interactive, automated update program which can be used for maintaining systems using RPM.</p></blockquote>
<p>So YUM actually is, in essence, an advanced version of RPM.  <a href="http://en.wikipedia.org/wiki/Yellow_dog_Updater%2C_Modified" target="_blank">According to Wikipedia</a>, YUM is a &#8220;package-management utility for RPM-compatible Linux operating systems&#8221;.  So really, you can only use YUM if you are on one of the above RPM enabled systems.  To me that means that YUM was created to improve RPM.</p>
<p>Both utilities are going to perform the exact same functions.  However, one big advantage that YUM has over RPM, is that YUM will automatically resolve package dependencies.  If the package being installed requires additional dependencies, YUM can install those automatically, while RPM will simply prompt to install those first.  This can save some time if the rpm you are installing requires multiple dependencies, say for instance if you are installing <a href="http://www.gnome.org/" target="_blank">Gnome</a> or <a href="http://www.kde.org/" target="_blank">KDE</a>.  Another benefit to YUM Is that it can be modified with Python plugins.  For instance, the yum-downloadonly plugin can be installed so yum will download the rpm package, but will not install it.  </p>
<p>After researching the issue, I have come to the conclusion that if you are an RPM-enabled distro, it should have YUM on it.  If it doesn&#8217;t install it and use it.  YUM appears to be far more flexible and extensible than RPM and is now my install of choice.  </p>
<p>What do you think between the two?  If there is something that I missed, by all means point it out here.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.poundbangwhack.com/2009/05/21/what-is-the-difference-between-rpm-and-yum/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Type carefully: The difference between /. and ./</title>
		<link>http://www.poundbangwhack.com/2009/05/20/type-carefully-the-difference-between-whack-dot-and-dot-whack/</link>
		<comments>http://www.poundbangwhack.com/2009/05/20/type-carefully-the-difference-between-whack-dot-and-dot-whack/#comments</comments>
		<pubDate>Thu, 21 May 2009 05:33:36 +0000</pubDate>
		<dc:creator>Mark Stoecker</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Command-Line]]></category>
		<category><![CDATA[SSH]]></category>

		<guid isPermaLink="false">http://www.poundbangwhack.com/?p=217</guid>
		<description><![CDATA[For all you Windows users out there who just happen to be reading this, there is a <strong>world of difference</strong> between "whack dot" <span class="pre"> /. </span> and "dot whack" <span class="pre"> ./ </span>.  In Linux, your root directory is labeled as "whack" <span class="pre"> / </span>.  Thinks of this like your C: Drive on your Windows machine.  Everything is relative to root.  For example, if the path to a file on Windows was <span class="pre"> C:foldersub-folderfile </span>, it would be <span class="pre"> /folder/sub-folder/file </span> on a Linux machine.  Yes the slashes point the other way from Windows to Linux: Windows uses "back slashes" <span class="pre"> / </span> and Linux uses "whacks" <span class="pre">  </span>.]]></description>
			<content:encoded><![CDATA[<p>Today&#8217;s post is a friendly reminder for all you fat-fingered typers out there: </p>
<blockquote><p>Be very careful when using a Linux command-line/SSH interface not to mistype, especially when you are the root user.</p></blockquote>
<p>This is something that I am sad to say I have come across on more than one occasion at my job (server technical support).  Tiny little mistakes can wreak havoc on your computer/server if you mistype while using the command-line/SSH.<br />
<span id="more-217"></span><br />
The information below uses the following keyboard slang:</p>
<blockquote><p> = backslash<br />
/ = whack<br />
. = dot</p>
<p>Find these <a href="http://www.codejacked.com/know-your-keyboard-bang-splat-whack/" target="_blank">Keyboard Slang and more at codejacked.com</a>
</p></blockquote>
<p>For all you Windows users out there who just happen to be reading this, there is a <strong>world of difference</strong> between &#8220;whack dot&#8221; <span class="pre"> /. </span> and &#8220;dot whack&#8221; <span class="pre"> ./ </span>  In Linux, your root directory is labeled as &#8220;whack&#8221; <span class="pre"> / </span>  Thinks of this like your C: Drive on your Windows machine.  Everything is relative to root.  For example, if the path to a file on Windows was <span class="pre"> C:&#92;folder&#92;sub-folder&#92;file </span>, it would be <span class="pre"> /folder/sub-folder/file </span> on a Linux machine.  Yes the slashes point the other way from Windows to Linux: Windows uses &#8220;back slashes&#8221; <span class="pre"> &#92; </span> and Linux uses &#8220;whacks&#8221; <span class="pre"> / </span>  If a file/folder location starts with a &#8220;whack&#8221; <span class="pre"> / </span>, it means &#8220;from the root directory&#8221;.  When dealing with file locations, the &#8220;dot&#8221; <span class="pre"> . </span> means the files in the current/selected directory.  So, literally &#8220;whack dot&#8221; <span class="pre"> /. </span> means &#8220;all the files in the root directory&#8221; since the path begins with the &#8220;whack&#8221;; while &#8220;dot whack&#8221; <span class="pre"> ./ </span> means &#8220;all the files in the current directory&#8221; since the path begins with the &#8220;dot&#8221;.</p>
<p>&#8220;Why bring this up?&#8221; you may be asking.  Because you can cause a world of hurt if you mix up the two.  Say for instance you want to delete all the files/folders in the current directory, a legitimate use.  The correct command would be <code>rm -R ./</code>  The <span class="pre"> -R </span> means &#8220;recursive&#8221;, meaning delete all files in any folder you come to, and then delete the folder, since only empty folders can be deleted on Linux.  Or say for instance you needed to change the ownership of all the files/folders in the current directory.  Again, the correct command would be <code>chown -R <em>user:group</em> ./</code>  This would set all files in, and below, the current directory to a user of <em>user</em> and a group of <em>group</em>.  Those of you who have been following along can see where I&#8217;m going with this.  If you mistakenly typed &#8220;whack dot&#8221; <span class="pre"> /. </span> instead of &#8220;dot whack&#8221; <span class="pre"> ./ </span> you just deleted all the files (recursively) starting at the root directory, or basically <strong>everything on your computer</strong>.  Likewise with the <span class="pre"> chown </span> command, you would&#8217;ve just changed the user and group for every file (recursively) starting in the root directory. Since certain services have to be run by specific users, this will cause problems.</p>
<p>Now luckily, the <span class="pre"> rm </span> command for instance, is usually set as an alias to the command <span class="pre"> rm -i </span> which means &#8220;prompt before removing each file&#8221;.  However, if you <em>think</em> you know what you&#8217;re doing and decide to use the <span class="pre"> -f </span> switch, this forces removal with no prompt.  Therefore, if you leave off the <span class="pre"> -f </span> when using <span class="pre"> rm </span>, you&#8217;ll be prompted before removing any files, which may save you time, money, headaches, and in some cases, your job.  Plus, for those of you who don&#8217;t know, unlike Windows, there is no &#8220;Recycle Bin&#8221; on Linux.  Once you delete something, it&#8217;s gone for good.  You can&#8217;t get it back.</p>
<p>There are plenty of other situations where a simple misspelling can cause all sorts of problems, especially when it comes to using switches (like the <span class="pre">-f</span>, <span class="pre">-i</span> or <span class="pre">-R</span> listed above), these two are just the most common mistakes I see.  The bottom line is, especially when you&#8217;re logged in as the root user, just be careful when your working via command-line.  Take 2 seconds to review your command before you hit &#8220;Enter&#8221;, because once you do, there&#8217;s no going back.  If there is (going back), it&#8217;s not fun, it&#8217;s not easy, no one wants to do it, it will waste your time, and it will cost you money.</p>
<p>How about you?  Have you ever &#8220;fat-fingered&#8221; something like this and caused problems?  Post yours below.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.poundbangwhack.com/2009/05/20/type-carefully-the-difference-between-whack-dot-and-dot-whack/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
