mba*_*man 9 backup time-machine macos
在备份实际发生之前查看 Time Machine 将备份的内容会很有用。我相信应该可以用mdfind
. 是否有一个标准的搜索查询来完成这个?或者直接问Time Machine的方法?
Ded*_*tos 10
在 OS X 10.7 (Lion) 中,您可以使用tmutil
. 要将机器的当前状态与最近的备份进行比较,您只需使用以下命令,
tmutil compare
Run Code Online (Sandbox Code Playgroud)
但是您可能希望将输出重定向到一个文件,因为它可能有很多。您可以将比较限制为某些类型的差异(例如,文件大小、文件权限)。它做得更多,但我无法比tmutil
手册页本身更简洁地描述细节:
compare [-@esmugtdrvEX] [-D depth] [snapshot_path | path1 path2]
Perform a backup diff.
If no arguments are provided, tmutil will compare the computer to
the latest snapshot. If a snapshot path is provided as the sole
argument, tmutil will compare the computer to the specified snap-
shot. If two path arguments are provided, tmutil will compare
those two items to each other. tmutil will attempt to inform you
when you have asked it to do something that doesn't make sense or
isn't supported.
The compare verb allows you to specify what properties to com-
pare. If you specify no property options, it is assumed that you
want to compare a basic set of metadata. This default property
set is equivalent to the -smugt option set. Specifying any prop-
erty option overrides the default set.
Options:
-a compare all suppored metadata
-@ compare extended attributes
-e compare ACLs
-s compare sizes
-m compare file modes
-u compare UIDs
-g compare GIDs
-t compare modification times
-d compare file data forks
-r ignore specified root paths and compare descendents
instead
-D limit traversal depth to depth levels from the begin-
ning of iteration
-E don't take exclusions into account when comparing items
inside volumes
-v enable verbose mode (enables reporting of all identical
items, which is noisy)
-X print output in XML property list format
Run Code Online (Sandbox Code Playgroud)
1:从Time Machine备份卷上的文件夹名称中解析上次备份时间。如果可能,请使用“最新”链接指向的链接。忽略那些带有“.progress”扩展名的内容(现在不在 Mac 上,所以我可以稍微休息一下)
2 和 3:读取属性列表并将它们用作排除文件(如果可能),或者简单地从这些路径和“grep -v $excluded”创建正则表达式。
归档时间: |
|
查看次数: |
4615 次 |
最近记录: |