在 linux 中,ls -l
列出文件权限,如下所示:
-rw-r--r-- 1 user user 924 2011-07-01 20:23 test.txt
Run Code Online (Sandbox Code Playgroud)
在 Windows 中,命令tree
和dir
没有列出权限的选项。如何仅使用命令行列出文件及其权限?
我在 Windows 7 上有一些文件,想看看我今天早上(2 月 27 日早上)阅读它的时间,但是当我右键单击该文件并选择“属性”时,我看到
Accessed: Yesterday, Feb 26, 2011, 2:12:37PM
Run Code Online (Sandbox Code Playgroud)
所以我再次打开文件读取内容,然后再次打开属性,访问(日期)仍然相同(2月26日)。
即使我在“访问日期”文件夹中添加一列,它仍然显示 2 月 26 日。但今天是 2 月 27 日,显然我已经“访问”了它……那么我如何才能看到上次访问的真实日期?
有没有办法从 Windows XP 及更高版本的命令行获取文件的元数据?
特别是,我有兴趣获取通常在 Windows 7 中文件“属性”对话框的“详细信息”选项卡上看到的信息。(XP 中的“版本”选项卡。)两者的屏幕截图如下,以提供一个想法我所追求的。
如果可能,我宁愿通过cmd.exe
Windows XP SP3 及更高版本的标准或其他方式来执行此操作。如果这是不可能的,我的首选替代方案是:
Windows XP 屏幕截图:
Windows 7 屏幕截图:
我试图知道是否在文件系统上设置了 relatime 或 noatime,但我没有在 /etc/fstab 中找到信息,也没有在内核启动选项中找到。
首先,很明显我没有“正常”的行为:
root@antec:/tmp# rm -f test.txt; echo a>test.txt
root@antec:/tmp# stat test.txt | \grep -i 2011
Access: 2011-08-01 21:54:30.000000000 +0200
Modify: 2011-08-01 21:54:30.000000000 +0200
Change: 2011-08-01 21:54:30.000000000 +0200
root@antec:/tmp# cat test.txt > /dev/null
root@antec:/tmp# stat test.txt | \grep -i 2011
Access: 2011-08-01 21:54:53.000000000 +0200
Modify: 2011-08-01 21:54:30.000000000 +0200
Change: 2011-08-01 21:54:30.000000000 +0200
root@antec:/tmp# date
Mon Aug 1 21:55:00 CEST 2011
root@antec:/tmp# cat test.txt > /dev/null
root@antec:/tmp# stat test.txt | \grep -i 2011
Access: 2011-08-01 21:54:53.000000000 +0200 …
Run Code Online (Sandbox Code Playgroud) 我正在寻找一种高级方法来读取希捷 1TB 内部硬盘的 NTFS 文件系统上的 MFT 条目。平台为Windows 7。
我需要获取文件名、块大小和 LBA。
这是一项特殊的任务,因此我需要编写一个程序来执行此操作吗?
command-line ×2
filesystems ×2
windows ×2
windows-7 ×2
hard-drive ×1
kernel ×1
linux ×1
metadata ×1
ntfs ×1
sectors ×1
stat ×1
windows-xp ×1