-
Notifications
You must be signed in to change notification settings - Fork 0
Linux Opt: shell
x893675 edited this page Dec 15, 2019
·
3 revisions
# 找出修改日期比makefile的修改日期更近的全部c文件
find . -name '*.c' -newer Makefile -print
# 上周哪些c文件没有改动过
find . -ame '*.c' -mtime+7 -print
# 批量删除镜像
docker images | sed '1d' | awk '{cmd="docker rmi "$1":"$2;system(cmd)}'
# 批量导出镜像
#!/bin/bash
IMAGES_LIST=($(docker images | sed '1d' | awk '{print $1":"$2}'))
docker save ${IMAGES_LIST[*]} -o all-images.tar.gz