Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#17241 closed bug (no change required)

stat command does not display file creation time correctly

Reported by: fuhllrdv Owned by: axeld
Priority: normal Milestone: R1/beta4
Component: File Systems/BFS Version: R1/beta3
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description (last modified by fuhllrdv)

https://i.imgur.com/xeNKlmD.png

Correct is, shows file creation time under Birth.

https://man7.org/linux/man-pages/man2/statx.2.html

stx_btime
              The file's creation timestamp.

I know that Haiku OS uses the word ctime to indicate file creation time, https://www.haiku-os.org/docs/api/classBStatable.html#ac80b82a49b8c757d4bf0034d70c33eb1.

Fills out ctime with the creation time of the node.

But Haiku OS ctime is not the same as Linux/Unix ctime.

Linux/Unix ctime means this here.

stx_ctime
              The file's last status change timestamp.

The first solution is to do the same as with stat command under Linux.

If you don't like the first solution, I recommend to customize stat command under Haiku OS. That is Birth is removed as a word and Created is added. So the user has the same word (Created) as in Tracker.

Change History (8)

comment:1 by fuhllrdv, 3 years ago

Description: modified (diff)

comment:2 by fuhllrdv, 3 years ago

This was only tested with the Live CD. As you can see, I edited the text file but only "Modify" was updated but not "Change".

Here is a second bug:

When I install Haiku OS (R1/beta3) on the hard disk and edit the text file and run stat command. "Modify" and "Change" are automatically updated. But file creation time "Birth" is not displayed, so I have changed the main post. The second bug needs to be fixed.

https://i.imgur.com/xAXeBfv.png

comment:3 by korli, 3 years ago

Resolution: no change required
Status: newclosed

comment:4 by fuhllrdv, 3 years ago

Resolution: no change required
Status: closedreopened

stat is a coreutils command: ​https://github.com/haikuports/haikuports/issues/5628

Thank you for the information. I have reopened the report because current implementation of stat is very erroneous. The current implementation of stat command should be removed completely.

stat command should be implented only when it is properly adapted for Haiku OS and BFS.

The details are in this ticket.

comment:5 by X512, 3 years ago

This should be probably reported to HaikuPorts (https://github.com/haikuports/haikuports/issues), where Haiku stat patches are located.

comment:6 by korli, 3 years ago

Resolution: no change required
Status: reopenedclosed

comment:7 by korli, 3 years ago

There is already an OPEN issue at Haikuports for this.

Note: See TracTickets for help on using tickets.