/var/lib/docker/containers/下文件删除
时间: 2023-09-11 07:06:47 浏览: 179
要删除/var/lib/docker/containers/目录下的文件,可以使用以下命令:
sudo du -d1 -h /var/lib/docker/containers | sort -h
du -D -h /var/lib/docker/containers | sort -h
这些命令将显示/var/lib/docker/containers/目录中的文件和文件夹的大小,并按大小进行排序。您可以查看这些文件和文件夹的大小,并根据需要删除它们。
另外,您还可以使用以下命令删除/var/lib/docker/containers/目录下的日志文件:
find /var/lib/docker/containers/ -name "*-json.log" -type f -exec rm -f {} \;
这个命令将查找/var/lib/docker/containers/目录下所有以“-json.log”结尾的文件,并将其删除。请谨慎使用该命令,并确保您真正想要删除这些文件。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [Docker目录/var/lib/docker/containers文件太大](https://blog.csdn.net/qq_38882672/article/details/120194055)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *2* [Docker 目录/var/lib/docker/containers文件过大](https://blog.csdn.net/hansome_hong/article/details/124166229)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *3* [docker /var/lib/docker/aufs/mnt 目录清理方法](https://download.csdn.net/download/weixin_38640072/14888956)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
[ .reference_list ]
阅读全文