Why should you run cd . before doing anything?

You don’t.

At least not just like that. The preceding line in the quoted document is of importance:

  • Set up your prompt to do a pwd everytime you cd.
  • Always do a cd . before doing anything.

This way, you as the operator verify your current working dir before doing anything of importance, as it’s printed out with each change. cd . doesn’t make any sense otherwise.

This “verification” is a good thing, and you should adapt a form of it. A more (IMHO) common variation of this theme is to always print out the working dir at the prompt.

Leave a Comment