-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Open
Labels
Description
Rust coreutils, compiled from the main branch (ca6d69a as of the time of writing):
$ cargo run --release --features unix -- stat /
Finished `release` profile [optimized] target(s) in 0.12s
Running `target/release/coreutils stat /`
File: /
size: 4096 Blocks: 8 IO Block: 4096 directory
Device: fc01h/64513d Inode: 2 Links: 23
Access: (0755/drwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2025-10-24 17:16:40.447022494 -0700
Modify: 2025-05-02 18:37:54.159527224 -0700
Change: 2025-05-02 18:37:54.159527224 -0700
Birth: 2024-07-25 14:12:04.000000000 -0700
GNU stat:
$ stat /
File: /
Size: 4096 Blocks: 8 IO Block: 4096 directory
Device: 252,1 Inode: 2 Links: 23
Access: (0755/drwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2025-10-24 17:16:40.447022494 -0700
Modify: 2025-05-02 18:37:54.159527224 -0700
Change: 2025-05-02 18:37:54.159527224 -0700
Birth: 2024-07-25 14:12:04.000000000 -0700
The Rust coreutils stat prints out a raw u16 value in hex and decimal form, while GNU stat splits the u16 into a major and minor u8 pair. This is a mismatch in stdout output between the two utils.