Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试在网站上使用 xattr 将一些元数据存储在 .txt 文件中,然后下载它。如果我在本地运行网站时在临时文件上使用 PHP 的 xattr_set,PHP 中的 xattr_list 和命令行中的 python-xattr 都会向我显示我设置的属性。但是,当我使用 readfile 下载文件时,属性不再显示。有没有办法在下载时保留这些属性?
不是直接的。HTTP 无法指定文件系统扩展属性,因此您需要将它们打包为适当的存档格式,以便在元数据中指定它们,例如 GNU tar 和--xattrs.
--xattrs