Bug 254887

Summary: Add for touch change created time (btime)
Product: Base System Reporter: akww244 <akw24542>
Component: kernAssignee: freebsd-bugs (Nobody) <bugs>
Status: New ---    
Severity: Affects Only Me    
Priority: ---    
Version: 13.0-STABLE   
Hardware: Any   
OS: Any   

Description akww244 2021-04-08 15:30:47 UTC
Description:
FreeBSD 13 supports 3 timestamps (atime, mtime, and btime). touch utility can change atime and mtime with this command.

atime = touch -a
mtime = touch -m

But support for btime is missing.


Steps to reproduce:

1) Create a .txt file. Then open the .txt file and edit the .txt file and save. Now have 3 different timestamps for atime, mtime and btime.


stat -f "Accessed (atime): %Sa%nModified (mtime): %Sm%nCreated  (btime): %SB" '/home/liveuser/Desktop/123.txt' 
Accessed (atime): Apr 08 10:37:48 2021
Modified (mtime): Apr 08 09:27:47 2021
Created  (btime): Apr 06 19:26:34 2021

2) Change with touch -> btime


3) This is not possible because there is no touch command that can change btime.


Expectation:
touch supports changing btime. The command to change btime could be: touch -b