Linux 和 macOS 下解读 UNIX 时间戳
Linux: date -d @<seconds>
macOS: date -r <seconds>
Linux: date -d @<seconds>
macOS: date -r <seconds>
find / -xdev -printf '%h\n' | sort | uniq -c | sort -k1 -nr | head
%h
可以输出父目录的路径,配合 sort 和 uniq 可以找出 inode 占用问题的元凶。
jq -s '.[0] + .[1]' stub.json cfg.json
https://docs.docker.com/engine/reference/commandline/dockerd/#daemon-configuration-file
修改 /etc/docker/daemon.json
,配置 data-root 参数即可。
https://docs.docker.com/config/daemon/#docker-daemon-directory
The Docker daemon persists all data in a single directory. This tracks everything related to Docker, including containers, images, volumes, service definition, and secrets.
By default this directory is:
/var/lib/docker
on Linux.C:\ProgramData\docker
on Windows.You can configure the Docker daemon to use a different directory, using the
data-root
configuration option.
macOS 系统上莫名其妙出现了 Library/ApplicationSupport
这个软链接指向 Library/Application Support
。排查一番发现是 iTerm2 搞的鬼。
iTerm2 creates the ApplicationSupport symlink to Application Support because shell scripts may not have spaces in their paths and the pip utiltiy does not work correctly in directories with spaces.