Date: Wed, 07 Apr 2021 02:44:30 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 254842] cp -p does not support preserving created time (btime) Message-ID: <bug-254842-227@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D254842 Bug ID: 254842 Summary: cp -p does not support preserving created time (btime) Product: Base System Version: 13.0-STABLE Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: kern Assignee: bugs@FreeBSD.org Reporter: akw24542@eoopy.com 1) Create a .txt file. Then open the .txt file and edit the .txt file and s= ave. Now have 3 different timestamps for atime, mtime and btime. stat -f "Accessed (atime): %Fa%nModified (mtime): %Fm%nCreated (btime): %F= B" '/home/liveuser/Desktop/123.txt'=20 Accessed (atime): 1617769412.044026000 Modified (mtime): 1617769415.349392000 Created (btime): 1617768991.589695000 2) Copy the file from the source to the destination. cp -p '/home/liveuser/Desktop/123.txt' '/' 3) View the file info of the destination. stat -f "Accessed (atime): %Fa%nModified (mtime): %Fm%nCreated (btime): %F= B" '/123.txt'=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20 Accessed (atime): 1617769412.044026000 Modified (mtime): 1617769415.349392000 Created (btime): 1617769415.349392000 Result: atime and mtime were preserved. But btime was not preserved by the source a= nd was automatically set to mtime. Expectation: cp -p supports preserving btime from the source to the destination. The sup= port works for files and directories. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-254842-227>