如何使用 isoinfo 命令提取 ISO 文件的 Volume ID
如何使用 isoinfo 命令提取 ISO 文件的 Volume ID
使用 isoinfo -d -i 命令可以查看 ISO 文件的详细信息,其中包括 Volume ID。
示例:提取 Windows10_x64.iso 的 Volume ID
假设您要提取名为 Windows10_x64.iso 的 ISO 文件的 Volume ID,可以使用以下命令:
isoinfo -d -i Windows10_x64.iso | grep 'Volume id' | cut -d ':' -f 2- | sed 's/^[ \t]*//'
解释:
isoinfo -d -i Windows10_x64.iso:使用 isoinfo 命令查看 ISO 文件信息。grep 'Volume id':过滤包含 'Volume id' 行的内容。cut -d ':' -f 2-:以冒号为分隔符,提取第二列及以后的内容。sed 's/^[ \t]*//':删除行首的空格和制表符。
执行上述命令后,您将获得 Windows10_x64.iso 的 Volume ID。
原文地址: https://www.cveoy.top/t/topic/f2yw 著作权归作者所有。请勿转载和采集!