Skip to main content
added 22 characters in body
Source Link
Kevin
  • 41.7k
  • 17
  • 91
  • 113

While there are answers that do the exact action that you want, a more standard method for such purpose is to create symbolic link:

ln -s ~/web/www/project proj #use full path to dir! 

Then you could cdcd to dirthe directory using the name projproj:

cd proj 

This method is more flexible because you could access files using the short name without cdcd:

ls proj/ #note the endslash! vim proj/file.x 

While there are answers that do the exact action that you want, more standard method for such purpose is to create symbolic link:

ln -s ~/web/www/project proj #use full path to dir! 

Then you could cd to dir using name proj:

cd proj 

This method is more flexible because you could access files using the short name without cd:

ls proj/ #note the endslash! vim proj/file.x 

While there are answers that do the exact action that you want, a more standard method for such purpose is to create symbolic link:

ln -s ~/web/www/project proj #use full path to dir! 

Then you could cd to the directory using the name proj:

cd proj 

This method is more flexible because you could access files using the short name without cd:

ls proj/ #note the endslash! vim proj/file.x 
Source Link
corvinus
  • 314
  • 1
  • 3

While there are answers that do the exact action that you want, more standard method for such purpose is to create symbolic link:

ln -s ~/web/www/project proj #use full path to dir! 

Then you could cd to dir using name proj:

cd proj 

This method is more flexible because you could access files using the short name without cd:

ls proj/ #note the endslash! vim proj/file.x