[Bug 15622] New: mv timestamp awkward behaviour
bugzilla at busybox.net
bugzilla at busybox.net
Tue Jun 6 14:21:35 UTC 2023
https://bugs.busybox.net/show_bug.cgi?id=15622
Bug ID: 15622
Summary: mv timestamp awkward behaviour
Product: Busybox
Version: 1.35.x
Hardware: All
OS: Linux
Status: NEW
Severity: normal
Priority: P5
Component: Other
Assignee: unassigned at busybox.net
Reporter: friedtj at free.fr
CC: busybox-cvs at busybox.net
Target Milestone: ---
Created attachment 9604
--> https://bugs.busybox.net/attachment.cgi?id=9604&action=edit
busybox configuration file
I need to remember a file last access with sub-second accuracy. On a Raspberry
Pi4 running Buildroot 2022.08.1 (raspberrypi4_64_defconfig) using Busybox
1.35.0:
1. create a file on the /tmpfs of the Raspberry Pi 4
TWSTFT:13:44# touch toto
TWSTFT:13:44# stat toto
File: toto
Size: 0 Blocks: 0 IO Block: 4096 regular empty file
Device: 13h/19d Inode: 10525 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2023-06-06 13:44:44.804197892 +0000
Modify: 2023-06-06 13:44:44.804197892 +0000
Change: 2023-06-06 13:44:44.804197892 +0000
All times are given with ns resolution.
When moving the file using Busybox's mv from /tmp (tmpfs) to an external hard
disk formatted in EXT4:
TWSTFT:13:44# cd /root/data/
TWSTFT:13:44# mv /tmp/toto .
TWSTFT:13:45# stat toto
File: toto
Size: 0 Blocks: 0 IO Block: 4096 regular empty file
Device: 801h/2049d Inode: 303 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2023-06-06 13:44:44.000000000 +0000
Modify: 2023-06-06 13:44:44.000000000 +0000
Change: 2023-06-06 13:45:02.224085953 +0000
The Access and Modify times are now truncated to one-second resolution. If on
the same HDD I create a file
TWSTFT:13:45# touch hdd
TWSTFT:13:45# stat hdd
File: hdd
Size: 0 Blocks: 0 IO Block: 4096 regular empty file
Device: 801h/2049d Inode: 304 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2023-06-06 13:45:11.468026512 +0000
Modify: 2023-06-06 13:45:11.468026512 +0000
Change: 2023-06-06 13:45:11.468026512 +0000
the statistics with full resolution are kept. Is this a bug in mv or a feature?
Thanks.
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the busybox-cvs
mailing list