如何检测时间机器?

时间:2014-02-28 14:03:30

标签: macos timemachine

我需要将用于时间机器的硬盘分区与其他普通分区区分开来。 是否有API来检测时间机器分区/卷?

1 个答案:

答案 0 :(得分:2)

只要你在Lion或以上,Apple就为名为tmutil的时间机器添加了一个命令行工具。根据手册页,运行tmutil destinationinfo会返回以下信息:

Name          The volume label as shown in Finder.
Kind          Whether the destination is locally attached storage or a network device.
URL           In the case of a network destination, the URL used for Time Machine 
              configuration.
Mount Point   If the volume is currently mounted, the path in the file system at which
              it was mounted.
ID            The unique identifier for the destination.

When the -X option is provided, output will be printed in XML property list format.