<?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>antoniolorusso.com &#187; shell</title>
	<atom:link href="http://antoniolorusso.com/category/shell/feed/" rel="self" type="application/rss+xml" />
	<link>http://antoniolorusso.com</link>
	<description>About me and what I do :)</description>
	<lastBuildDate>Mon, 21 Jun 2010 22:17:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>BASH: rename files</title>
		<link>http://antoniolorusso.com/2010/02/26/bash-rename-files/</link>
		<comments>http://antoniolorusso.com/2010/02/26/bash-rename-files/#comments</comments>
		<pubDate>Fri, 26 Feb 2010 11:46:38 +0000</pubDate>
		<dc:creator>antonio lorusso</dc:creator>
				<category><![CDATA[shell]]></category>
		<category><![CDATA[awk]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[rename]]></category>
		<category><![CDATA[xargs]]></category>

		<guid isPermaLink="false">http://antoniolorusso.com/2010/02/26/bash-rename-files/</guid>
		<description><![CDATA[A simple rename example using again the mighty awk and xargsls -l *.xml &#124; awk '{print $9}' &#124; xargs -t -i mv {} {}.old Explanation:ls -l *.xml -&#62; easy! list the xml files in a folderawk '{print $9}' -&#62; output just the name of the filexargs -t -i mv {} {}.old -&#62; rename it adding [...]]]></description>
			<content:encoded><![CDATA[<p>A simple rename example using again the mighty awk and xargs<br /><code>ls -l *.xml | awk '{print $9}' | xargs -t -i mv {} {}.old</code></p>
<p>Explanation:<br /><b><code>ls -l *.xml</code></b> -&gt; easy! list the xml files in a folder<br /><b><code>awk '{print $9}'</code></b> -&gt; output just the name of the file<br /><b><code>xargs -t -i mv {} {}.old</code></b> -&gt; rename it adding at the same filename the extension &#8220;.old&#8221;</p>
<p>I know, I know &#8230; my explanation is crap: blame my laziness <img src='http://antoniolorusso.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://antoniolorusso.com/2010/02/26/bash-rename-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>disable Pure-ftpd logging on syslog</title>
		<link>http://antoniolorusso.com/2010/02/06/disable-pure-ftpd-logging-on-syslog/</link>
		<comments>http://antoniolorusso.com/2010/02/06/disable-pure-ftpd-logging-on-syslog/#comments</comments>
		<pubDate>Sat, 06 Feb 2010 14:33:04 +0000</pubDate>
		<dc:creator>antonio lorusso</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[log]]></category>
		<category><![CDATA[pure-ftpd]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://antoniolorusso.com/?p=322</guid>
		<description><![CDATA[Pure-ftpd is a bit tricky to configure because do not handle the configuration like any other daemon in Linux so you will not find any /etc/pure-ftpd.conf. According to the pure-ftpd documentation, you should start the daemon already with the options you need. The default Ubuntu installation, use the files in /etc/pure-ftpd/conf/ to set the options [...]]]></description>
			<content:encoded><![CDATA[<p>Pure-ftpd is a bit tricky to configure because do not handle the configuration like any other daemon in Linux so you will not find any /etc/pure-ftpd.conf.</p>
<p>According to the pure-ftpd documentation, you should start the daemon already with the options you need. The default Ubuntu installation, use the files in /etc/pure-ftpd/conf/ to set the options for the startup script of pure-ftpd so, to disable the logging, execute the following command in your shell and restart the daemon<br />
<code>$ echo "none" &gt; /etc/pure-ftpd/conf/SyslogFacility<br />
$ /etc/init.d/pure-ftpd-mysql restart</code></p>
<p> <img src='http://antoniolorusso.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://antoniolorusso.com/2010/02/06/disable-pure-ftpd-logging-on-syslog/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>svn revert cleanup</title>
		<link>http://antoniolorusso.com/2009/06/26/svn-revert-cleanup/</link>
		<comments>http://antoniolorusso.com/2009/06/26/svn-revert-cleanup/#comments</comments>
		<pubDate>Fri, 26 Jun 2009 12:17:27 +0000</pubDate>
		<dc:creator>antonio lorusso</dc:creator>
				<category><![CDATA[SVN]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[awk]]></category>
		<category><![CDATA[xargs]]></category>

		<guid isPermaLink="false">http://antoniolorusso.com/2009/06/26/svn-revert-cleanup/</guid>
		<description><![CDATA[You have reverted an svn merge and you have a lot of files not tracked (with exclamation mark, basically)?Clean it up:svn status &#124; awk '$1 == "?"&#160; {print $2}' &#124; xargs -t -i rm -r {}Again, knowing awk and xargs turn helpful!]]></description>
			<content:encoded><![CDATA[<p>You have reverted an svn merge and you have a lot of files not tracked (with exclamation mark, basically)?<br />Clean it up:<br /><code>svn status | awk '$1 == "?"&nbsp; {print $2}' | xargs -t -i rm -r {}</code><br />Again, knowing awk and xargs turn helpful!</p>
<p></p>
]]></content:encoded>
			<wfw:commentRss>http://antoniolorusso.com/2009/06/26/svn-revert-cleanup/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>bash: mv files with a specific date to another directory</title>
		<link>http://antoniolorusso.com/2009/06/06/bash-mv-files-with-a-specific-date-to-another-directory/</link>
		<comments>http://antoniolorusso.com/2009/06/06/bash-mv-files-with-a-specific-date-to-another-directory/#comments</comments>
		<pubDate>Sat, 06 Jun 2009 14:13:33 +0000</pubDate>
		<dc:creator>antonio lorusso</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[shell]]></category>

		<guid isPermaLink="false">http://antoniolorusso.com/2009/06/06/bash-mv-files-with-a-specific-date-to-another-directory/</guid>
		<description><![CDATA[I was searching for a bash command to move files and directories from a folder to another with modified in a specific date for ages on google until I gave up and decided to write it myself: ls -l &#124; awk '$6 == "2009-06-04" { print $8 }' &#124; xargs -t -i mv {} /destination/folder [...]]]></description>
			<content:encoded><![CDATA[<p>I was searching for a bash command to move files and directories from a folder to another with modified in a specific date for ages on google until I gave up and decided to write it myself:<br />
<code> ls -l | awk '$6 == "2009-06-04" { print $8 }' | xargs -t -i mv {} /destination/folder</code><br />
To understand what this line does, you need to know a bit about <a href="http://www.gnu.org/software/gawk/manual/gawk.html" target="_blank"><span style="font-weight: bold;">awk</span></a> and <span style="font-weight: bold;">xargs</span> (try &#8220;man xargs&#8221; in your shell)</p>
<p>Explaination:<br />
<span style="font-weight: bold;"><br />
ls -l</span> : directory listing<br />
<span style="font-weight: bold;">awk &#8216;$6 == &#8220;2009-06-04&#8243; { print $8 }</span> : take the files and dir with date 2009-06-04 and print the list<br />
<span style="font-weight: bold;">xargs -t -i mv {} /destination/folder</span> : execute the mv command. {} is the result from the previous command.</p>
<p>I would like to explain you more, but I&#8217;m quite lazy and I leave you with google to undestand better the commands I&#8217;ve used.</p>
<p>Have fun! <img src='http://antoniolorusso.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://antoniolorusso.com/2009/06/06/bash-mv-files-with-a-specific-date-to-another-directory/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ignore .DS_Store forever in GIT</title>
		<link>http://antoniolorusso.com/2009/03/09/ignore-ds_store-forever-in-git/</link>
		<comments>http://antoniolorusso.com/2009/03/09/ignore-ds_store-forever-in-git/#comments</comments>
		<pubDate>Sun, 08 Mar 2009 23:56:25 +0000</pubDate>
		<dc:creator>antonio lorusso</dc:creator>
				<category><![CDATA[GIT]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[scm]]></category>
		<category><![CDATA[version control]]></category>

		<guid isPermaLink="false">http://antoniolorusso.com/2009/03/09/ignore-ds_store-forever-in-git/</guid>
		<description><![CDATA[With a couple of little commands, you&#8217;ll be able to ignore the .DS_Store files forever from your git repositories on mac! The following command will add the .gitignore file to the git configuration git config --global core.excludesfile ~/.gitignore then, the following, will add the .DS_Store to the list echo .DS_Store &#62;&#62; ~/.gitignore and voilà!]]></description>
			<content:encoded><![CDATA[<p>With a couple of little commands, you&#8217;ll be able to ignore the .DS_Store files forever from your git repositories on mac!</p>
<p>The following command will add the .gitignore file to the git configuration<br />
<code><br />
git config --global core.excludesfile ~/.gitignore<br />
</code></p>
<p>then, the following, will add the .DS_Store to the list</p>
<p><code><br />
echo .DS_Store &gt;&gt; ~/.gitignore<br />
</code></p>
<p>and voilà!</p>
<div class="zemanta-pixie"><img class="zemanta-pixie-img" src="http://img.zemanta.com/pixy.gif?x-id=e83f7a3e-301f-45e6-a80d-154706e6fe03" alt="" /></div>
]]></content:encoded>
			<wfw:commentRss>http://antoniolorusso.com/2009/03/09/ignore-ds_store-forever-in-git/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>proper nfs umount</title>
		<link>http://antoniolorusso.com/2008/07/09/proper-nfs-umount/</link>
		<comments>http://antoniolorusso.com/2008/07/09/proper-nfs-umount/#comments</comments>
		<pubDate>Wed, 09 Jul 2008 10:09:53 +0000</pubDate>
		<dc:creator>antonio lorusso</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[nfs]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Hi if you try to umount an NFS mountpoint this way root:~&#62; umount /mountpoint and your shell answer this way umount: /mountpoint: device is busy umount: /mountpoint: device is busy then try killing all processes using the mountpoint and update the nfs export fs root:~&#62; fuser -k -m /mountpoint root:~&#62; exportfs -au at this point, [...]]]></description>
			<content:encoded><![CDATA[<p>Hi</p>
<p>if you try to umount an NFS mountpoint this way<br />
<code>root:~&gt; umount /mountpoint</code><br />
and your shell answer this way<br />
<code>umount: /mountpoint: device is busy<br />
umount: /mountpoint: device is busy</code><br />
then try killing all processes using the mountpoint and update the nfs export fs<br />
<code>root:~&gt; fuser -k -m /mountpoint<br />
root:~&gt; exportfs -au</code><br />
at this point, you can safely umount<br />
<code>root:~&gt; umount /mountpoint</code></p>
<p>peace!</p>
]]></content:encoded>
			<wfw:commentRss>http://antoniolorusso.com/2008/07/09/proper-nfs-umount/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
