Language: Objective Caml
License: GNU GPL
This utility can take snapshots of directories (tree representations with file names and stats, but not contents), and compare snapshots of the same directory looking for differences in stats: for instance modification date etc. It is quite fast (on my system, taking and comparing snaps of my home folder (6700 files in 500 folders) takes 90ms and 70ms respectively).
Code: Select all
usage: dsnap [options] <command> Basic Commands: snap <dir> to <path> Create a snapshot of directory <dir>, stored in file <path> diff <snap1> <snap2> Compare two snapshots, looking for most kinds of differences. See the 'diff ... for ...' syntax for more information list <snap> Print the list of all files tracked in the snapshot read <snap> Same as 'list', but the names are organized by folder Advanced Commands: diff <s1> <s2> for [flags list] Compare two snapshots, looking for specific kinds of differences. See below for a list of flags. snap <dir> to <new_snapshot> diff <old_snapshot> [for [flags list]] Combination of the 'snap', 'diff' and optionally, 'for' syntaxes. Available flags: Simple flags: [unstable flags - apply to new or deleted elements] dir_erased : see which folders have disappeared dir_created : see new folders file_erased : see which files have disappeared file_created : see new files [stable flags - apply to elements in both snapshots] modif : see modified files access : see accessed files status : see files whose status has changed size : see files whose size has changed group : see files with changed group ownership user : see files with changed ownership perm : see files with changed permissions Composite flags: dir : dir_* file : file_* erased : *_erased created : *_created uflags : dir_* file_* sflags : modif access status size group user perm default : uflags modif user group all : uflags sflags Options: --follow-symlinks-dirs (-l) When taking a snapshot, don't follow symlinks pointing to folders --follow-symlinks-files (-lf) When taking a snapshot, don't follow symlinks pointing to ordinary files --follow-symlinks (-L) When taking a snapshot, don't follow any symlink --help (-h, -?) Display this help page and exit
Code: Select all
vincent@seth:~$ dsnap -L snap ~ to snap_before # here I change the setting I'm interested in... vincent@seth:~$ dsnap -L snap ~ to snap_after vincent@seth:~$ dsnap diff snap_before snap_after Snapshot diff on directory '/home/vincent' file modified: /home/vincent/.kderc file modified: /home/vincent/snap_before file modified: /home/vincent/.kde/share/apps/kdesktop/IconPositions file erased : /home/vincent/.kde/share/config/gtkrc file erased : /home/vincent/.kde/share/config/gtkrc-2.0 file modified: /home/vincent/.kde/share/config/kcmfonts file modified: /home/vincent/.kde/share/config/kdeglobals file modified: /home/vincent/.kde/share/config/kdesktoprc file modified: /home/vincent/.kde/share/config/kwinrc file modified: /home/vincent/.kde/share/config/systemsettingsrc file modified: /home/vincent/.qt/qtrc