Friday 19 June 2009

Link

Here's some potentially harmful information about linking in unix:

If you ever feel the need to link to a directory, say:
ln -s someDir Pointer
then when removing the link, do not use tab-complete. That means:
rm -rf Pointer/
will cause a headache: it will not delete "Pointer", but everything beyond "Pointer" - which means "someDir" and everything inside. Instead, do:
rm -rf Pointer
The slash makes a world of difference.

Also, when testing stuff with pointers, never use your home directory. And be forewarned that
ln -s ./ ~/Pointer
is _not_ equal to
ln -s `pwd` ~/Pointer

The linux-users amongst you will have figured out by now what I've been doing all day. (Besides pulling out my hair, that is.) Chances are everyone else has long since stopped reading.

On a positive note, right after I deleted everything in my homedirectory (as a matter of fact I was lucky and it got stuck halfway through - at least I've learned to stop rm when it starts to ask questions), I did finally manage to submit the paper I've been drafting for the past 9 months. So that's a relief.

Finally, I'm back in Morgantown for a day, departing to NYC tomorrow morning (where I'll be attending the Amaldi conference on gravitational waves). As much as you may not expect this, walking the streets of this little university town earlier today, it did feel like home. Slowly but truly I'm warming to this town - give it another half a year and who knows what'll happen ;-)

No comments:

Post a Comment