Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

Re^2: rename file

by haukex (Bishop)
on Aug 24, 2020 at 18:57 UTC ( #11121050=note: print w/replies, xml ) Need Help??

in reply to Re: rename file
in thread rename file

If this is all happening on the same file system, then it's an atomic rename (fully done or not at all).

It's not quite that simple. While rename(2) is supposed to be atomic on POSIXish systems, there are several of corner cases where that isn't completely reliable (e.g. NFS). One really has to know what OS and filesystem one is working on.

Replies are listed 'Best First'.
Re^3: rename file
by perlfan (Vicar) on Aug 24, 2020 at 19:40 UTC
    Thank you for clarifying this point, I almost mentioned NFS. OP didn't seem quite ready for a lesson of file systems, but I did want to relate it to what might actually be happening since they were thinking the operations were extension or file type aware. I also assumed they were coming from a more vulgar environment, like Windows (but used unix commands to illustrate the point nonetheless). That and using old skool CGI from 1990 seem to go hand in glove

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://11121050]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (6)
As of 2021-01-19 19:34 GMT
Find Nodes?
    Voting Booth?