<?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>Internetworking, Security &#38; Tech &#187; Shell</title>
	<atom:link href="http://www.nish.com/tag/shell/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.nish.com</link>
	<description></description>
	<lastBuildDate>Sun, 13 May 2012 23:46:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>Quick tip: change default text editor on Linux shell</title>
		<link>http://www.nish.com/2009/09/quick-tip-change-default-text-editor-on-linux-shell/</link>
		<comments>http://www.nish.com/2009/09/quick-tip-change-default-text-editor-on-linux-shell/#comments</comments>
		<pubDate>Wed, 02 Sep 2009 12:52:50 +0000</pubDate>
		<dc:creator>Nish Vamadevan</dc:creator>
				<category><![CDATA[UNIX]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Shell]]></category>

		<guid isPermaLink="false">http://www.fnode.com/?p=477</guid>
		<description><![CDATA[Doing visudo you get nano instead of your favorite text editor? Mine is vim therefore I issue: DEBIAN/UBUNTU way # update-alternatives --config editor There are 4 alternatives which provide `editor'. Selection Alternative ----------------------------------------------- 1 /usr/bin/vim.tiny 2 /bin/ed *+ 3 /bin/nano 4 /usr/bin/vim.basic Press enter to keep the default[*], or type selection number: Selecting 4 I&#8217;m [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>Doing visudo you get nano instead of your favorite text editor?<br />
Mine is vim therefore I issue:</p>
<p><strong>DEBIAN/UBUNTU way</strong></p>
<pre>
# update-alternatives --config editor
There are 4 alternatives which provide `editor'.
  Selection    Alternative
-----------------------------------------------
          1    /usr/bin/vim.tiny
          2    /bin/ed
*+        3    /bin/nano
          4    /usr/bin/vim.basic
Press enter to keep the default[*], or type selection number:
</pre>
<p>Selecting 4 I&#8217;m ready to use my full syntax colors when I edit any file.</p>
<p><strong>OTHER DISTROS</strong><br />
Edit your .bashrc file and add the following:</p>
<pre>EDITOR=vim
export EDITOR</pre>
<p>Next login you will have your VIM working.<br />
If you want to have it immediately and only for this session just type </p>
<pre># export EDITOR=vim</pre>
<p>and press enter.</p>]]></content:encoded>
			<wfw:commentRss>http://www.nish.com/2009/09/quick-tip-change-default-text-editor-on-linux-shell/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to change the file timestamp on Linux</title>
		<link>http://www.nish.com/2009/08/how-to-change-the-file-timestamp-in-a-linux-system/</link>
		<comments>http://www.nish.com/2009/08/how-to-change-the-file-timestamp-in-a-linux-system/#comments</comments>
		<pubDate>Sat, 29 Aug 2009 19:09:02 +0000</pubDate>
		<dc:creator>Nish Vamadevan</dc:creator>
				<category><![CDATA[UNIX]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Shell]]></category>

		<guid isPermaLink="false">http://www.fnode.com/?p=464</guid>
		<description><![CDATA[This tip might comes handy when you do a system check and you want to make sure you don&#8217;t check the same file twice. Let&#8217;s pretend that our &#8220;file1&#8243; is a conf file that needs review. As you can see the output of the command issued below shows that the file was last edited in [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>This tip might comes handy when you do a system check and you want to make sure you don&#8217;t check the same file twice.</p>
<p>Let&#8217;s pretend that our &#8220;file1&#8243; is a conf file that needs review. As you can see the output of the command issued below shows that the file was last edited in June.<br />
Today I want to check the file without editing it and make sure next time I won&#8217;t check it again:</p>
<pre>
$ ls -l
total 0
-rw-r--r-- 1 luca luca 290 2009-06-29 16:33 file1
</pre>
<p><a href="http://www.manpagez.com/man/1/touch/" rel="nofollow" target="_blank" class="external_icon">Touch</a> is an excellent tool in this case:</p>
<pre>
$ touch file1
$ ls -l
total 0
-rw-r--r-- 1 luca luca 0 2009-08-29 19:43 file1
</pre>
<p>The Modification Time has changed and so has the access time.</p>
<p>If you want to change just the modification time leaving the access time untouched try with the -m option</p>
<pre>
$ touch -m file1
$ ls -l
total 0
-rw-r--r-- 1 luca luca 0 2009-08-29 19:46 file1
$ stat file1
[..]
Access: 2009-08-29 19:43:45.000000000 +0100
Modify: 2009-08-29 19:46:15.000000000 +0100
Change: 2009-08-29 19:46:15.000000000 +0100
</pre>
<p>And -a is just for the Access Time.</p>
<p>Another interesting option is -t. It lets you set the time and the date with whatever you like. This is often used to do fishy things <img src='http://www.nish.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<pre>
$ touch -t 200701012301 file1
$ stat file1
[..]
Access: 2007-01-01 23:01:00.000000000 +0000
Modify: 2007-01-01 23:01:00.000000000 +0000
Change: 2009-08-29 19:52:26.000000000 +0100
</pre>]]></content:encoded>
			<wfw:commentRss>http://www.nish.com/2009/08/how-to-change-the-file-timestamp-in-a-linux-system/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

