github.com/sld880311/docker@v0.0.0-20200524143708-d5593973a475/docs/reference/commandline/diff.md (about) 1 --- 2 title: "diff" 3 description: "The diff command description and usage" 4 keywords: "list, changed, files, container" 5 --- 6 7 <!-- This file is maintained within the docker/docker Github 8 repository at https://github.com/docker/docker/. Make all 9 pull requests against that repo. If you see this file in 10 another repository, consider it read-only there, as it will 11 periodically be overwritten by the definitive file. Pull 12 requests which include edits to this file in other repositories 13 will be rejected. 14 --> 15 16 # diff 17 18 ```markdown 19 Usage: docker diff CONTAINER 20 21 Inspect changes to files or directories on a container's filesystem 22 23 Options: 24 --help Print usage 25 ``` 26 27 ## Description 28 29 List the changed files and directories in a container᾿s filesystem since the 30 container was created. Three different types of change are tracked: 31 32 | Symbol | Description | 33 |--------|---------------------------------| 34 | `A` | A file or directory was added | 35 | `D` | A file or directory was deleted | 36 | `C` | A file or directory was changed | 37 38 You can use the full or shortened container ID or the container name set using 39 `docker run --name` option. 40 41 ## Examples 42 43 Inspect the changes to an `nginx` container: 44 45 ```bash 46 $ docker diff 1fdfd1f54c1b 47 48 C /dev 49 C /dev/console 50 C /dev/core 51 C /dev/stdout 52 C /dev/fd 53 C /dev/ptmx 54 C /dev/stderr 55 C /dev/stdin 56 C /run 57 A /run/nginx.pid 58 C /var/lib/nginx/tmp 59 A /var/lib/nginx/tmp/client_body 60 A /var/lib/nginx/tmp/fastcgi 61 A /var/lib/nginx/tmp/proxy 62 A /var/lib/nginx/tmp/scgi 63 A /var/lib/nginx/tmp/uwsgi 64 C /var/log/nginx 65 A /var/log/nginx/access.log 66 A /var/log/nginx/error.log 67 ```