Bug 254887 - Add for touch change created time (btime)
Summary: Add for touch change created time (btime)
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 13.0-STABLE
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
Depends on:
Reported: 2021-04-08 15:30 UTC by akww244
Modified: 2021-04-08 15:31 UTC (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description akww244 2021-04-08 15:30:47 UTC
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.

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