Modified files

2 snippets across 2 stacks - Docker, Git

DKDocker

See Filesystem Changes

DK · Debugging
Syntax
docker diff <container>
Example
docker diff web-api
Output
C /app
A /app/logs/error.log
A /tmp/cache-abc123
D /app/config.bak

Note Shows which files were Added (A), Changed (C), or Deleted (D) compared to the image. Handy for understanding what the running process has modified on disk.

GitGit

Check Repository Status

Git · Basic Workflow
Syntax
git status [-s]
Example
git status
git status -s
Output
On branch main
Changes not staged for commit:
  modified:   app.js
Untracked files:
  utils.js

# Short format:
 M app.js
?? utils.js

Note The short flag (-s) gives a compact two-column output: left column = staging area, right column = working tree. M = modified, A = added, ? = untracked, D = deleted.

Frequently asked questions

How does Docker handle modified files?
This task is covered in 2 stacks on this page: Docker, Git. The "See Filesystem Changes" snippet in Docker uses `docker diff <container>`.
Which command does the Docker example use?
The "See Filesystem Changes" snippet uses `docker diff <container>`, from the Debugging section of the Docker cheat sheet.
Which stacks cover "modified files" on this page?
Docker, Git. Together they hold 2 copy-ready snippets for this task.
Is there anything to watch out for?
Yes. For "See Filesystem Changes": Shows which files were Added (A), Changed (C), or Deleted (D) compared to the image. Handy for understanding what the running process has modified on disk.