Wednesday, March 17, 2010

linux/*nix bash 4.x autocd ..

for those who dont know about latest features in bash 4.x :

sometime you know the folder name but to reach to that folder you need to go from one to another.

eg: /home/project/web/avs/desktop

with bash new autocd you can simply type

cd /home/**/desktop

the double '*' character indicate 'autocd'

same thing when you are frustrated with php, you can simply do:

rm -f /**/*.php


ok, first you must enable the autocd by using the following command:


shopt -s globstar autocd



happy "bash"ing :)

No comments: