Home

Awesome

tdiff

Compare files inode attributes

Coverity: Coverity Scan Build Status

Features

Compare two file trees, showing any differences in their:

Documentation

tdiff comes with an extensive manual page.

View or download the manual page as: [HTML], [PDF] or [ROFF].

Examples

Check that the two file trees rooted at directory1 and directory2 are exactly the same, including symbolic link targets if any, permissions, hard disk block usage, owner user or group ids, and if supported, flags, ACLs and extended attributes:

tdiff directory1 directory2

 

Same as previous example, but also check that the file modification times are the same:

tdiff -i directory1 directory2

 

Only report if any files are present in only one directory:

tdiff -0 --dirs directory1 directory2

 

Report only ownership (user or group id) differences, ignore any missing files:

tdiff -0 --uid --gid directory1 directory2

 

Report only group permission bits differences, ignore any missing files:

tdiff -0 --mode --mode-and 70 directory1 directory2

or:

tdiff -0 --mode --mode-or 7707 directory1 directory2

 

Report only sticky bits differences, ignore any missing files:

tdiff -0 --mode --mode-and 1000 directory1 directory2

or:

tdiff -0 --mode --mode-or 6777 directory1 directory2

 

Run cmp -l on every file of the same size in both trees:

tdiff -0 --exec cmp -l %1 %2 \; directory1 directory2

 

Run super-diff: diff files with diff -u and reports any other kind of differences in inode contents except for times:

tdiff --exec-always-diff directory1 directory2

or more tersely:

tdiff -W directory1 directory2

 

Same with file modification times:

tdiff -W --preset mtime directory1 directory2

or also:

tdiff -Wi directory1 directory2

License

tdiff is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see [http://www.gnu.org/licenses/].

Building from source

Requirements

From a release

Download the latest release from GitHub or the secondary mirror:

The source code release are signed with the GPG key ID 0x88D51582, available on your nearest GPG server or here.

You can also find all releases on the GitHub release page and on the secondary mirror.

When downloading from the GitHub release pages, be careful to download the source code from the link named with the full file name (tdiff-0.8.7.tar.gz), and not from the links marked Source code (zip) or Source code (tar.gz) as these are repository snapshots generated automatically by GitHub and require specialized tools to build (see Building from GitHub).

After downloading the sources, unpack and build with:

tar xvzf tdiff-0.8.7.tar.gz
cd tdiff-0.8.7
./configure
make
make check
make install
make install-pdf install-html # Optional

Alternately, you can create a RPM file by moving the source tar file and the included tdiff.spec in your rpm build directory and running:

rpmbuild -ba SPECS/tdiff.spec

From the GitHub repository

Clone the repository, including submodules:

git clone --recurse-submodules https://github.com/F-i-f/tdiff.git
cd tdiff
autoreconf -i
./configure
make
make check
make install
make install-pdf install-html # Optional

Changelog

Version 0.8.7

January 30, 2024.

Bugs fixed:
Improvements:

Version 0.8.6

May 20, 2022.

Bugs fixed:

Version 0.8.5

November 1, 2019.

Bugs fixed:

Version 0.8.4

June 14, 2019.

New features:
Bugs fixed:

Version 0.8.3

May 22, 2019.

Bugs fixed:

Version 0.8.2

May 12, 2019.

Bugs fixed:
Other changes:

Version 0.8.1

May 7, 2019.

Bugs fixed:
Other changes:

Version 0.8

May 3, 2019.

New features:
User-visible changes:
Bugs fixed:
Other changes:

Version 0.7.2

April 30, 2019.

Version 0.7.1

April 27, 2019.

Version 0.7

April 26, 2019.

New features:

User-visible changes:

Bugs fixed:

Internal changes

Release 0.2

January 31, 2014.

Credits

tdiff was written by Philippe Troin (F-i-f on GitHub).

<!-- LocalWords: tdiff inode uid gid ACLs UFS MacOSX nbsp eg xattr --> <!-- LocalWords: MERCHANTABILITY gcc libacl ACL autotools autoconf --> <!-- LocalWords: automake groff GPG gz github Zsh hardlinks mmap --> <!-- LocalWords: xattrs DJB2 NOATIME getdents64 FreeBSD Solaris zsh --> <!-- LocalWords: Troin Changelog directory1 directory2 atime nlinks --> <!-- LocalWords: nlink vert README xtimespec tdiff's ROFF fakeroot --> <!-- LocalWords: BuildRequires Coverity symlinks XFS acl cmp glibc --> <!-- LocalWords: mallinfo2 -->