Simple question

Da'iMacDaddy

Unix Newb.
Could I use an alias to set it up so that when I type something like cd /downloads it would be the same as typing cd ./downloads? and if so how would I go about that would it be something like alias cd / - cd ./? and if not how would I make it do that ?

Nate Coffield
 
Ouch, that's pretty messy. If you want to go to downloads in the current directory, you would use cd downloads or cd ./downloads. Only if you wanted to find it in the root directory would you type cd /downloads.

So, while you could set up an alias, it would prevent you from accessing anything via absolute referencing. So, if you wanted to open /etc, you would not be able to do it unless you were in root or you cd'ed to .. a few times. Whatever, it would be messy.

Basically, you don't want an alias to do this as it would mess you up, severely. You shouldn't be typing /downloads unless you mean /downloads!
 
Back
Top