« Twitter reference | Main | Greatest gizmo ever »

Mental note

This should be obvious after you think of it, but it is a honest mistake and cleaning up the mess afterwards can cause you big problems, so here it is:

Running some_command --base=~/Sites/dir is very different from some_command --base ~/Sites/dir

The extra = makes all the difference. With it, the ~/ is not expanded to your $HOME by the bash shell, so if your some_command uses that path as a base directory, you'll end up with a new path like ./~/Sites/dir.

This means that in your current working directory, you'll have a subdirectory named ~, and you might be tempted to just rm -rf ~ to clean it up...

I think that we can all agree that a rm -rf ~ command would be disastrous (the correct command would be rm -rf ./~), so please be careful when using options with parameters. The = will disable shell expansion, and you could end up in a bad place.

Contacts

melo@simplicidade.org (XMPP/email)
+351 302 029 050 (voice)
melopt (Skype)

IronMan challenge

Iron Man badge Are you ready to be an Iron Man? Join the challenge and find out! (what is the meaning of this little man?)

Moosaico

Junta-te!

Recent Comments

Powered by Disqus
Creative Commons License
This weblog is licensed under a Creative Commons License.
Powered by
Movable Type 3.2