自动解压文件
我有一个充满压缩文件的文件夹(大约 200 个)。我想将其转换为仅包含解压缩文件的文件夹。做到这一点最简单、最快的方法是什么?
请注意,我想在解压缩后从文件夹中删除压缩文件。
另外,我用的是 Mac。
谢谢!
I have a folder full of zipped files (about 200). I would like to transform this into a folder consisting only of unzipped files. What would be the easiest and quickest way to do this?
Please note that I would like to remove the zipped file from the folder once it us unzipped.
Also, I'm on a Mac.
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以执行以下操作:
我们循环遍历目录中的所有
zip
文件,将其解压缩,然后将其删除。请注意,
zip
的-f
选项将覆盖任何文件,而不会提示是否发现重复文件。您需要从包含所有 zip 文件的目录在命令行上运行上述一行命令。这一行相当于:
You can do something like:
We are looping through all the
zip
files in the directory, unzipping it and then deleting it.Note that the
-f
option ofzip
will overwrite any file without prompting if it finds a duplicate.You need to run the above one-line command on the command line from the directory that has the all the zip files. That one line is equivalent to:
我发现这个答案这是一个简单的答案liner 用于gunzip 文件夹内的所有.gz 压缩文件。
基本上你 cd 到该文件夹然后运行
如果你只想解压具有特定前缀的文件,你可以将其放在 *
Easy as cake!之前!
I found this answer which is a simple one liner to gunzip all .gz compressed files within a folder.
Basically you cd to the folder and then run
If you want to only unzip files with a certain prefix you put that before the *
Easy as cake!