<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: 6 Awesome Linux cd command Hacks &#8211; Productivity Tip#3 for Geeks</title>
	<atom:link href="http://www.thegeekstuff.com/2008/10/6-awesome-linux-cd-command-hacks-productivity-tip3-for-geeks/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.thegeekstuff.com/2008/10/6-awesome-linux-cd-command-hacks-productivity-tip3-for-geeks/</link>
	<description>Guides, HowTos and Tips for Technology Geeks</description>
	<lastBuildDate>Wed, 17 Mar 2010 06:04:01 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: The Beginner&#8217;s Guide to The Geek Stuff &#8211; A Guided Tour</title>
		<link>http://www.thegeekstuff.com/2008/10/6-awesome-linux-cd-command-hacks-productivity-tip3-for-geeks/comment-page-1/#comment-27683</link>
		<dc:creator>The Beginner&#8217;s Guide to The Geek Stuff &#8211; A Guided Tour</dc:creator>
		<pubDate>Tue, 29 Dec 2009 15:10:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.thegeekstuff.com/?p=233#comment-27683</guid>
		<description>[...] 6 Awesome Linux cd command Hacks – Productivity Tip#3 for Geeks [...]</description>
		<content:encoded><![CDATA[<p>[...] 6 Awesome Linux cd command Hacks – Productivity Tip#3 for Geeks [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert Coward</title>
		<link>http://www.thegeekstuff.com/2008/10/6-awesome-linux-cd-command-hacks-productivity-tip3-for-geeks/comment-page-1/#comment-17718</link>
		<dc:creator>Robert Coward</dc:creator>
		<pubDate>Wed, 23 Sep 2009 15:18:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.thegeekstuff.com/?p=233#comment-17718</guid>
		<description>Beware that this forum is apparently susceptible to browser security hacks. In my previous post, I used angle brackets (less than and greater than symbols) to outline the parameter to my up command, but your site interpreted these as HTML tags and they did not appear. So my text should have read something like &quot;up number to step up number of levels&quot;, where number was encased in these brackets.

Since the site seems to interpret raw text as HTML, I can imagine that it would be possible to embed all sorts of nasties in here. In my opinion, anything entered on forums should be interpreted as raw text and displayed as such.</description>
		<content:encoded><![CDATA[<p>Beware that this forum is apparently susceptible to browser security hacks. In my previous post, I used angle brackets (less than and greater than symbols) to outline the parameter to my up command, but your site interpreted these as HTML tags and they did not appear. So my text should have read something like &#8220;up number to step up number of levels&#8221;, where number was encased in these brackets.</p>
<p>Since the site seems to interpret raw text as HTML, I can imagine that it would be possible to embed all sorts of nasties in here. In my opinion, anything entered on forums should be interpreted as raw text and displayed as such.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert Coward</title>
		<link>http://www.thegeekstuff.com/2008/10/6-awesome-linux-cd-command-hacks-productivity-tip3-for-geeks/comment-page-1/#comment-17649</link>
		<dc:creator>Robert Coward</dc:creator>
		<pubDate>Tue, 22 Sep 2009 16:47:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.thegeekstuff.com/?p=233#comment-17649</guid>
		<description>Regarding changing up directory levels in Linux, here&#039;s the method I use all the time. First, I define a shell script called upl somewhere on my path:

#!/bin/bash
if [ $1 ]
then
	steps=$1
else
	steps=1
fi
while [ $steps -gt 0 ]
do
	cd ..
	(( steps = steps - 1 ))
done
pwd

Then, I add the following line to my .bashrc:

alias up=&quot;source upl&quot;

Then, wherever I am, it&#039;s simply a metter of typing &quot;up&quot; to just go up one level, or &quot;up &quot; to step up  of levels. So if I&#039;m 8 levels doen in a massive source tree, typing &quot;up 8&quot; will immediatley jump up 8 levels, and print the new directory where I am. In this way, I can roughly guess how many levels I need to step up, and fine tune if afterwards, if required.

While extremely noddy, this simple script saves so much hassle ,and I really think something like it should be standard in the Linux command shell.</description>
		<content:encoded><![CDATA[<p>Regarding changing up directory levels in Linux, here&#8217;s the method I use all the time. First, I define a shell script called upl somewhere on my path:</p>
<p>#!/bin/bash<br />
if [ $1 ]<br />
then<br />
	steps=$1<br />
else<br />
	steps=1<br />
fi<br />
while [ $steps -gt 0 ]<br />
do<br />
	cd ..<br />
	(( steps = steps &#8211; 1 ))<br />
done<br />
pwd</p>
<p>Then, I add the following line to my .bashrc:</p>
<p>alias up=&#8221;source upl&#8221;</p>
<p>Then, wherever I am, it&#8217;s simply a metter of typing &#8220;up&#8221; to just go up one level, or &#8220;up &#8221; to step up  of levels. So if I&#8217;m 8 levels doen in a massive source tree, typing &#8220;up 8&#8243; will immediatley jump up 8 levels, and print the new directory where I am. In this way, I can roughly guess how many levels I need to step up, and fine tune if afterwards, if required.</p>
<p>While extremely noddy, this simple script saves so much hassle ,and I really think something like it should be standard in the Linux command shell.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sandy miller</title>
		<link>http://www.thegeekstuff.com/2008/10/6-awesome-linux-cd-command-hacks-productivity-tip3-for-geeks/comment-page-1/#comment-9626</link>
		<dc:creator>sandy miller</dc:creator>
		<pubDate>Wed, 06 May 2009 09:00:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.thegeekstuff.com/?p=233#comment-9626</guid>
		<description>A friend and myself have been arguing about an issue similar to this one! Now I know that I was right. lol! Thanks for the information you posted.</description>
		<content:encoded><![CDATA[<p>A friend and myself have been arguing about an issue similar to this one! Now I know that I was right. lol! Thanks for the information you posted.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Samus_</title>
		<link>http://www.thegeekstuff.com/2008/10/6-awesome-linux-cd-command-hacks-productivity-tip3-for-geeks/comment-page-1/#comment-4905</link>
		<dc:creator>Samus_</dc:creator>
		<pubDate>Sun, 18 Jan 2009 22:38:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.thegeekstuff.com/?p=233#comment-4905</guid>
		<description>agree with Sam however quotes are important there, I recommend this way:

    mcd() { mkdir -p &quot;$1&quot; &amp;&amp; cd &quot;$1&quot;; }

the latter won&#039;t have problems with spaces on the argument.

as for the cd alias, instead of defining several ones it might be better to use a function too:

    ..() {
        local levels=$1
        while ((levels &gt; 0)); do
            cd .. &#124;&#124; break
            let &quot;levels--&quot;
        done
    }

with this you&#039;ll do &quot;.. 3&quot; and it will go back three levels and you can use any number.</description>
		<content:encoded><![CDATA[<p>agree with Sam however quotes are important there, I recommend this way:</p>
<p>    mcd() { mkdir -p &#8220;$1&#8243; &amp;&amp; cd &#8220;$1&#8243;; }</p>
<p>the latter won&#8217;t have problems with spaces on the argument.</p>
<p>as for the cd alias, instead of defining several ones it might be better to use a function too:</p>
<p>    ..() {<br />
        local levels=$1<br />
        while ((levels &gt; 0)); do<br />
            cd .. || break<br />
            let &#8220;levels&#8211;&#8221;<br />
        done<br />
    }</p>
<p>with this you&#8217;ll do &#8220;.. 3&#8243; and it will go back three levels and you can use any number.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sam</title>
		<link>http://www.thegeekstuff.com/2008/10/6-awesome-linux-cd-command-hacks-productivity-tip3-for-geeks/comment-page-1/#comment-2244</link>
		<dc:creator>Sam</dc:creator>
		<pubDate>Sun, 26 Oct 2008 19:18:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.thegeekstuff.com/?p=233#comment-2244</guid>
		<description>Eval? What&#039;s wrong with function mcd(){ mkdir -p $* &amp;&amp; cd $* }</description>
		<content:encoded><![CDATA[<p>Eval? What&#8217;s wrong with function mcd(){ mkdir -p $* &amp;&amp; cd $* }</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sridhar Sarnobat</title>
		<link>http://www.thegeekstuff.com/2008/10/6-awesome-linux-cd-command-hacks-productivity-tip3-for-geeks/comment-page-1/#comment-2134</link>
		<dc:creator>Sridhar Sarnobat</dc:creator>
		<pubDate>Thu, 23 Oct 2008 16:38:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.thegeekstuff.com/?p=233#comment-2134</guid>
		<description>3) Also, alias pwd to p.

4) In TCSH, use bindkey to bind &#039;Alt-p&#039; to pwd.</description>
		<content:encoded><![CDATA[<p>3) Also, alias pwd to p.</p>
<p>4) In TCSH, use bindkey to bind &#8216;Alt-p&#8217; to pwd.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sridhar Sarnobat</title>
		<link>http://www.thegeekstuff.com/2008/10/6-awesome-linux-cd-command-hacks-productivity-tip3-for-geeks/comment-page-1/#comment-2133</link>
		<dc:creator>Sridhar Sarnobat</dc:creator>
		<pubDate>Thu, 23 Oct 2008 16:37:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.thegeekstuff.com/?p=233#comment-2133</guid>
		<description>In TCSH:
1) you also have a shell variable implicitcd so you don&#039;t need to type &#039;cd&#039; at all.

2) alias cd to pushd, and set the shell variables pushdtohome and pushdsilent. cd now behaves as usual but now if you type &#039;dirs -v &#039; (alias this to d), you get a stack of all the directories you&#039;ve been to. You can easily cd back to those by typing &#039;cd =1/&#039; etc.</description>
		<content:encoded><![CDATA[<p>In TCSH:<br />
1) you also have a shell variable implicitcd so you don&#8217;t need to type &#8216;cd&#8217; at all.</p>
<p>2) alias cd to pushd, and set the shell variables pushdtohome and pushdsilent. cd now behaves as usual but now if you type &#8216;dirs -v &#8216; (alias this to d), you get a stack of all the directories you&#8217;ve been to. You can easily cd back to those by typing &#8216;cd =1/&#8217; etc.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: minnmass</title>
		<link>http://www.thegeekstuff.com/2008/10/6-awesome-linux-cd-command-hacks-productivity-tip3-for-geeks/comment-page-1/#comment-2072</link>
		<dc:creator>minnmass</dc:creator>
		<pubDate>Tue, 21 Oct 2008 17:46:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.thegeekstuff.com/?p=233#comment-2072</guid>
		<description>A couple of suggestions included:

add the following alias to the .bash_profile and re-login...

If you put the alias(es) in ~/.bashrc, you can &#039;source ~/.bashrc&#039; to (a) apply the alias(es) immediately without logging out and back in, and (b) confirm that the alias(es) won&#039;t break anything, which can be difficult to fix if you can&#039;t log back in.

I&#039;m not sure, but I believe you can also &#039;source ~/.bash_profile&#039;.</description>
		<content:encoded><![CDATA[<p>A couple of suggestions included:</p>
<p>add the following alias to the .bash_profile and re-login&#8230;</p>
<p>If you put the alias(es) in ~/.bashrc, you can &#8217;source ~/.bashrc&#8217; to (a) apply the alias(es) immediately without logging out and back in, and (b) confirm that the alias(es) won&#8217;t break anything, which can be difficult to fix if you can&#8217;t log back in.</p>
<p>I&#8217;m not sure, but I believe you can also &#8217;source ~/.bash_profile&#8217;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: links for 2008-10-20 &#171; My place</title>
		<link>http://www.thegeekstuff.com/2008/10/6-awesome-linux-cd-command-hacks-productivity-tip3-for-geeks/comment-page-1/#comment-2032</link>
		<dc:creator>links for 2008-10-20 &#171; My place</dc:creator>
		<pubDate>Mon, 20 Oct 2008 19:03:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.thegeekstuff.com/?p=233#comment-2032</guid>
		<description>[...] 6 Awesome Linux cd command Hacks - Productivity Tip#3 for Geeks This article is part of the ongoing Productivity Tips for Geeks series. cd is one of the most frequently used command during a Unix session. In this article, I’ve provided 6 cd command hacks, which will boost your productivity instantly and make it easier to navigate the directory structure from command line. (tags: linux cd command line cli tips hack howto tutorial bash unix) [...]</description>
		<content:encoded><![CDATA[<p>[...] 6 Awesome Linux cd command Hacks &#8211; Productivity Tip#3 for Geeks This article is part of the ongoing Productivity Tips for Geeks series. cd is one of the most frequently used command during a Unix session. In this article, I’ve provided 6 cd command hacks, which will boost your productivity instantly and make it easier to navigate the directory structure from command line. (tags: linux cd command line cli tips hack howto tutorial bash unix) [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
