其实是有的,而且还被命名为zfs diff(文档和示例)
$ zfs diff tank/home/tim@snap1 tank/home/tim@snap2
M /tank/home/tim/
+ /tank/home/tim/fileB
Run Code Online (Sandbox Code Playgroud)
您还可以在快照和实时数据集之间进行比较,但只能在相同的数据集和后代中进行比较,并且只能按有效的时间顺序(意味着从旧到新而不是从新到旧,如果一开始不起作用,只需交换参数)。可能的结果是:
M : File or directory has been modified or file or directory link has changed
- : File or directory is present in the older snapshot but not in the more recent snapshot
+ : File or directory is present in the more recent snapshot but not in the older snapshot
R : File or directory has been renamed
Run Code Online (Sandbox Code Playgroud)
要过滤结果并在脚本中使用它们,另请参阅我在 StackOverflow 上的其他答案中的评论中的示例。
| 归档时间: |
|
| 查看次数: |
526 次 |
| 最近记录: |