Re: File renaming



Dave Turner <nobody@xxxxxxxxxxxxx> wrote:
> Why try to intentionally break things? Always close file handles before
> moving files, just swap your last two lines of code around

Why answer if you have (apprently) no idea how a unix filesystem works!

>> Will mango contain upto date data ? Or will the rename cause it to
>> contain incomplete data ?

I'm to lame to test but it should work.

A rename will only change the "name of the inode", since the inode is
already opened any (unflushed) buffers still point to the file formerly
known as hello.

>> (I could have checked, but don't have Linux with me.)

never leave home without a (eg knoppix) live CD :)

.



Relevant Pages

  • Re: Problem with java Rename function in solaris platform.
    ... Rename is just that. ... intended for moving files from drive to drive. ... exec a platform specific script that does it. ...
    (comp.lang.java.programmer)
  • Re: File renaming
    ... moving files, just swap your last two lines of code around ... > contain incomplete data? ... but don't have Linux with me.) ...
    (comp.lang.php)