Use “cd -” to toggle between the last two directories

On March 8, 2010, in cd, toggle, by Dipin Krishna

You can toggle between the last two current directories using cd – as shownbelow. [dipin@linuxgeek ~]$ cd /etc/[dipin@linuxgeek etc]$ pwd/etc[dipin@linuxgeek etc]$ cd /var/[dipin@linuxgeek var]$ pwd/var[dipin@linuxgeek var]$ cd -/etc[dipin@linuxgeek etc]$ pwd/etc[dipin@linuxgeek etc]$ Enjoy! ————————————————————————— The GNU/Linux Advanced Administration: In this ebook “The GNU/Linux Operating System”, the main contents are related with system administration. You will learn […]

 

Try to navigate up the directory using cd followed by consecutive dots

On March 7, 2010, in cd, directory, navigate, by Dipin Krishna

In the below example i have show how to navigate up to level 5 using cd……(cd followed by 6 dots).Here a single dot represents the current directory, 2 dot means 1 level up, 3 dots means 2 level up and so on.. Add the following alias. $ alias cd..=”cd ..”$ alias cd…=”cd ../..”$ alias cd….=”cd […]

 

Search