Files
tldr/pages.zh/osx/plutil.md

24 lines
857 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# plutil
> 查看、转换、验证或编辑属性列表“plist”文件。
> 更多信息:<https://keith.github.io/xcode-man-pages/plutil.1.html>。
- 以人类可读的格式显示一个或多个plist文件的内容
`plutil -p {{file1.plist file2.plist ...}}`
- 将一个或多个plist文件转换为XML格式覆盖原始文件
`plutil -convert xml1 {{file1.plist file2.plist ...}}`
- 将一个或多个plist文件转换为二进制格式覆盖原始文件
`plutil -convert binary1 {{file1.plist file2.plist ...}}`
- 将plist文件转换为不同格式并写入新文件
`plutil -convert {{xml1|binary1|json|swift|objc}} {{path/to/file.plist}} -o {{path/to/new_file.plist}}`
- 将plist文件转换为不同格式并写入`stdout`
`plutil -convert {{xml1|binary1|json|swift|objc}} {{path/to/file.plist}} -o -`