Sometimes I want a quick archive of just what I touched lately, not the whole folder. GNU tar can filter by date, but there are two similar options and they do not behave the same.
tar -cf ../recent.tar --newer-mtime='1 day ago' .
The help text says --newer-mtime=DATE compares the date and time when the data changed only. The date 1 day ago worked on GNU tar 1.35. The archive goes to the parent folder, because tar refuses to put the archive in itself (archive cannot contain itself; not dumped).
In a folder with old.txt (modified three days ago with touch -d) and new.txt, it stored this:
$ tar -tf ../recent.tar
./
./new.txt
The sibling option -N (--newer) looks like the same thing, but with the same date it also stored the old file:
$ tar -cf ../recent2.tar -N '1 day ago' .
$ tar -tf ../recent2.tar
./
./new.txt
./old.txt
The likely reason is that touch -d had just changed the inode change time of old.txt, and -N looks at that as well as at the modification time. Changing a file’s timestamp is not the only thing that updates that time, so -N can pick up more than you expect. When you only care about the content, --newer-mtime is the safer one.
Caveat: the ./ directory entry is stored as well. And a file that was deleted is not recorded at all, so this is no replacement for a real incremental backup. For that there is tar -g.
Further reading: GNU tar manual