Sujet : Are files overwritten in place by sftp? De : <bp (at) *nospam* www.zefox.net> Groupes :comp.unix.bsd.freebsd.misc Date : 17. Nov 2024, 18:28:40 Autres entêtes Organisation : A noiseless patient Spider Message-ID :<vhd948$nate$2@dont-email.me> User-Agent : tin/2.6.2-20221225 ("Pittyvaich") (FreeBSD/14.1-RELEASE-p5 (arm64))
In the event one copies a file or directory over an existing file or directory is the duplicate written to the same physical blocks in storage, or are new physical blocks written with the old blocks marked free?
The situation in mind is using get -r to copy a remote directory, then changing or adding a few files to the remote directory followed by using get -r to get the directory a second time. Clearly, changed files will require writing new blocks on the destination, but what about files with unchanged paths and contents?
The question is motivated by concerns about limited-life storage media such as flash.