windows如何决定两个具有相同时间戳的文件中哪一个更新?

当您有两个具有相同时间戳的相同文件时,Windows却说其中一个文件比另一个文件新,这意味着什么?怎么会这样?今天的超级用户问答帖子帮助困惑的读者解开了时间戳之谜。...

windows如何决定两个具有相同时间戳的文件中哪一个更新?

当您有两个具有相同时间戳的相同文件时,Windows却说其中一个文件比另一个文件新,这意味着什么?怎么会这样?今天的超级用户问答帖子帮助困惑的读者解开了时间戳之谜。

今天的问答环节是由SuperUser提供的,SuperUser是Stack Exchange的一个分支,是一个由社区驱动的问答网站分组。

问题

超级用户读者WBT想知道Windows如何决定两个具有相同时间戳的文件中哪一个更新:

When Windows displays a dialog like this with matching time stamps, how does it determine which of the two files is newer?

007Ys3FFgy1gpc076n3nhj30cy0dc74y

At first, I thought Windows was comparing the date created attribute and using the result of that comparison to label one or the other as newer. If a file was copied into a particular location, it may have the creation date of when the copy was made rather than the creation date of the original file. However, after reproducing it with another file, the result of which one is newer seems to be the opposite:

007Ys3FFgy1gpc077e8qwj30hd0br0uz

The result is the same whether copying or moving the file:

007Ys3FFgy1gpc0784q5oj30hd08swgx

And for background, the file in test2 is a previously made copy of the file in test1.

Windows如何决定两个具有相同时间戳的文件中哪一个更新?

答案

超级用户贡献者grawity为我们提供了答案:

Time stamps in the NTFS file system have a resolution of 100 nanoseconds (0.0000001 s). Even if the properties dialog shows the same rounded value, it could still be that the files were created within tenths of a second of each other.

Note: Most file systems measure times in μs or ns. FAT32 is a bit of a relic and rounds timestamps to two seconds.

Try one of the following methods to compare the full time stamps:

  • wmic datafile where name=”c:\\foo\\bar.txt” get lastmodified

Via PowerShell:

  • (Get-ChildItem c:\foo\bar.txt).LastWriteTime.ToString(“o”)

有什么要补充的解释吗?在评论中发出声音。想从其他精通技术的Stack Exchange用户那里了解更多答案吗?在这里查看完整的讨论主题。

图片来源:WBT(超级用户)

  • 发表于 2021-04-08 07:54
  • 阅读 ( 123 )
  • 分类:互联网

你可能感兴趣的文章

如何安全升级到Windows10并再次降级回Windows7或8.1

微软提出升级到Windows10免费版的提议在一年多前就结束了。但您仍然可以使用辅助技术解决方案或输入当前许可证密钥,将Windows 7或8.1的副本升级到Windows 10。 ...

  • 发布于 2021-03-12 14:39
  • 阅读 ( 229 )

windows备份和还原指南

... 本手册将指导您完成在Windows10中设置和维护定期备份的过程。这些概念几乎可以用于任何其他操作系统,尽管具体步骤可能略有不同。 ...

  • 发布于 2021-03-15 08:58
  • 阅读 ( 211 )

下面介绍如何在windows media player上添加外部字幕

确实可以使用Windows Media Player为正在观看的电影添加外部字幕。如果你在上面拧了很长时间的头发,这里有一个解决问题的方法。 ...

  • 发布于 2021-03-18 11:18
  • 阅读 ( 327 )

如何修复windows中dll文件丢失的错误

在Windows PC上看到DLL错误?这些常见的错误很难排除,因为您通常需要经过几个步骤才能找到问题。 ...

  • 发布于 2021-03-26 11:29
  • 阅读 ( 325 )

如何在Windows10上设置默认文件拖放行为

将文件或文件夹拖放到文件资源管理器中的新目标时,Windows有两个默认操作:复制或移动,具体取决于目标。然而,有一个隐藏的注册表黑客可以让你改变Windows10的默认行为。 windows 10的默认行为 默认情况下,Windows会将您拖...

  • 发布于 2021-04-02 00:55
  • 阅读 ( 161 )

提高电脑性能的10个快速步骤

...机启动缓慢时,一个常见的问题就是启动程序太多。要在Windows 10中解决此问题,请按Windows键,然后键入(并选择)任务管理器。 当任务管理器打开时,单击“启动”选项卡。在这里,您将看到所有设置为在Windows启动时打开的...

  • 发布于 2021-04-02 05:59
  • 阅读 ( 218 )

linux文件时间戳:atime、mtime和ctime

...们谈论Linux文件时间戳时。在本指南中,我们将解释系统如何更新它们,以及如何自己修改它们。 atime、mtime和ctime的区别 每个Linux文件都有三个时间戳:访问时间戳(atime)、修改时间戳(mtime)和更改时间戳(ctime)。 访问时...

  • 发布于 2021-04-02 16:01
  • 阅读 ( 337 )

Windows10 2019年11月的更新是迄今为止最好的

Windows10在2019年11月的更新,也就是1909版本,是迄今为止对Windows10最好的更新。这是一个小的更新,安装很快,没有添加任何疯狂的新功能,并没有破坏很多东西。 windows10每六个月就会更新一次 自Windows10发布以来,微软每半年...

  • 发布于 2021-04-02 21:31
  • 阅读 ( 210 )

如何在windows10中扫描文档

...化存储。本指南介绍如何在不安装第三方工具的情况下在Windows10中扫描文档。 通常,您可以使用**商提供的软件扫描文档。打印机和扫描仪通常附带一个光盘,其中包含必要的驱动程序和工具。如果你的电脑没有光驱,**商也会...

  • 发布于 2021-04-02 22:38
  • 阅读 ( 159 )

如何将windows用户迁移到不同的windows 10 pc

Microsoft已从Windows 10中删除“轻松传送”,但您仍然可以在电脑之间移动用户配置文件。Microsoft帐户很容易传送;您可以手动移动文件。Transwiz(免费)和PCmover(付费)也做得很好。 容易转移过去使事情变得容易 微软在WindowsVi...

  • 发布于 2021-04-03 12:57
  • 阅读 ( 201 )
oo4028148
oo4028148

0 篇文章

相关推荐