f0rhum wrote: > > ...is > mv > > counter to The Unix Philosophy > ? > > Small is > > beautiful. Make each program do one thing well. Choose portability > > over efficiency. Use shell scripts to increase leverage and > > portability. > > Would mv be discarded to the benefit of cp + rm? > Ok, I know we can't because mv also does in place rename. But when > it's time to real move who does use cp then rm?
The mv command causes an atomic rename(2) to occur if on the same file system. That is not possible when using cp + rm. Therefore mv is required. If mv'ing a file from one file system to another it is impossible to have an atomic rename(). In that case mv falls back to effectively cp plus rm. That is mentioned in the mv documentation. Bob