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.
我想在我的 prod 服务器上压缩日志文件,但我没有 winzip 和 pther 工具。只有 compress 命令在工作我尝试将它与 forfiles 一起使用,但在抛出错误时创建的 zip 文件。任何人都可以建议确切的语法。
如果您有 compress,那么根据其文档,您应该能够使用以下语法创建一个 zip 文件:
compress -Z file.txt file.zip