如何以毫秒为单位设置创建日期和时间到文件?

coo*_*obs 4 unix macos bash shell milliseconds

我正在尝试将创建日期和时间设置为以毫秒为单位进行归档。但不会按我的方式工作。

setfile -d "01/23/2000 12:00:00.099" file.txt
setfile -m "01/23/2001 12:00:00.499" file.txt
Run Code Online (Sandbox Code Playgroud)

等等

这种方式只能设置从小时到秒。不是毫秒怎么办??

Kam*_*Cuk 5

只需使用 coreutils touch

touch --date '01/23/2000 12:00:00.099' file.txt
Run Code Online (Sandbox Code Playgroud)