Shutup and Code

babblings of Myers Carpenter

Undocumented weird thing with hard links and rename(2)

Try this:

myers@soap:~/tmp$ touch a
myers@soap:~/tmp$ link a b
myers@soap:~/tmp$ mv a b
myers@soap:~/tmp$ ls
a  b

What? Why is "a" still around? Turns out rename(2) will not delete the first file in a rename if the second is linked to the same inode. AND the man page doesn't say anything.

July 4, 2004 (6 years, 2 months ago)

« Free Kaneko!
Jason And George @ HOPE5 »



blog comments powered by Disqus
Copyright (c) 2002-2010, Myers Carpenter

Me (as an xbox avatar)

silly xbox avatar

Twitter

Wait for the silly javascript to load up...

Other stuff

  • Pictures

Archive

What? Me Valid?

  • Valid XHTML 1.0
  • Valid CSS
  • Valid RSS

Let Your Computer Do The Reading

  • Friend of a Friend file
  • RSS 2.0 Feed
  • Atom 0.3 Feed
  • Sites by people near where I live