// reference
prismafs diff
It is important to note, PrismaFS doesn't keep history of changes over time. Every change is successive inside session layer since its creation. diff as utility command can tell you what changed in session when compared to base layer. This lets you decide if you want to export, keep, or discard it.
You simply point command to session directory. Base layer paths come from session's manifest, and so they don't need to be passed again. For testing purposes, mount, make any change of each kind, unmount, and then run diff directly on session (mount is not required here):
mkdir -p ~/pfs-base ~/pfs-session ~/pfs-mnt echo hello > ~/pfs-base/hello.txt echo keep-me > ~/pfs-base/old.txt export SESSION_LAYER_DIR=~/pfs-session export BASE_LAYER_DIRS=~/pfs-base prismafs ~/pfs-mnt echo world > ~/pfs-mnt/new.txt echo changed > ~/pfs-mnt/hello.txt rm ~/pfs-mnt/old.txt chmod 600 ~/pfs-mnt/hello.txt
Unmount (macOS: umount, Linux: fusermount3 -u), then:
umount ~/pfs-mnt prismafs diff ~/pfs-session
Output is one line per change, and totals are last:
diff for session '/home/you/pfs-session': added: new.txt removed: old.txt modified: hello.txt permissions changed: hello.txt (0644 -> 0600) 4 added, 1 removed, 1 modified, 1 permission/ownership change(s)
Per four categories: added, removed, modified and permission change. If you run diff on session with no modifications, output is (no differences from base).