Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I find myself wanting to type .. instead of cd .. a lot, so I created an alias for it in one my of my shells. It works as expected, and it doesn't seem to break basic cd and ls usage.

Is doing this a bad idea?

share|improve this question
2  
Is it a bad idea? Only in the sense that you're looking for a shortcut to counter carelessness instead of developing better habits. –  John Gardeniers Oct 20 '10 at 2:45
    
Good point. At first I thought that something so simple wouldn't ruin me, but it probably will. Thanks. –  Jeremy Heiler Oct 20 '10 at 3:05

3 Answers 3

up vote 4 down vote accepted

It won't break anything, but aliasing something as basic as cd .. might lead to bad habits. Really, you're better off training your fingers to do the right thing.

Also, what happens when you move to a new system, or get a new job, or need to maintain 1000 systems. You'll need to alias .. again, which can be a pain.

Many of us have done that in the past with other aliases, and learned that this was a bad idea, sometimes through a harsh experience.

share|improve this answer
1  
Which is why I tend to not use aliases in general. Thanks for the reminder. –  Jeremy Heiler Oct 20 '10 at 3:03
    
I use aliases for long or hard to remember commands, but I create new names for the aliases so that they don't interfere with existing aliases. –  Stefan Lasiewski Oct 20 '10 at 3:29

Nothing uses .. as a command, so this is acceptable.

share|improve this answer

Is doing this a bad idea?

Yes

share|improve this answer
    
When you go on other systems, you'll instinctively type '..' instead of 'cd ..' because of the bad habit. –  Belmin Fernandez Oct 20 '10 at 3:06

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.