Date: Tue, 29 Sep 2020 12:07:05 +0100 From: Arthur Chance <freebsd@qeng-ho.org> To: freebsd-questions@freebsd.org, Jerry <jerry@seibercom.net> Subject: Re: Preserving target file's creation date Message-ID: <fd9dc6ea-1641-e217-ec95-f10143df5335@qeng-ho.org> In-Reply-To: <20200929064218.00002422@seibercom.net> References: <20200929064218.00002422@seibercom.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On 29/09/2020 11:42, Jerry wrote: > I am trying to copy/move one file onto another. I need to preserve the > creation date of the target file. I see options to preserve the > creation date of the source file, but not the target file. Is it > possible? I think the creation time of a file is immutable, but if you were to truncate the file and then append to it, it should retain the original creation time while getting the contents of the source file. truncate -s 0 $file cat $otherfile >> $file -- The number of people predicting the demise of Moore's Law doubles every 18 months.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?fd9dc6ea-1641-e217-ec95-f10143df5335>