question about tar -N

R Kimber richardkimber at
Sat Aug 20 16:42:38 UTC 2011

I'm puzzled by how tar -N option works.

I tried many date formats and eventually found one that tar seemed happy
with, yet it didn't just archive the files that were newer than the
given date but also included some older files.  I've tried -N, --newer, and
--after-date.  The man page says that you can use a date or a
filename, and I have tried both.

I'm trying to set up a system for archiving *.flac and other music files.
When I run tar with a date option or a filename it seems to ignore *.jpg and
*.pdf files that are older than the given date (as expected) but it
includes some flac files in the tarball even though they are older than the

Is there another version of tar, other than that included with Ubuntu, that
does work, or am I trying to use it incorrectly?  I just want a tarball of
files (flac, mp3, jpg, pdf, ...whatever) that are newer than a particular
file (a pretty basic requirement). I know that --newer works with find, but
if there's a working tar option I'd rather just use that.

One command I tried was:-
tar --newer=./newones.txt --exclude-from="exclude.tar" -vcf
test.tar /media/audio/*

This dumped 
12:47 /media/audio/16bit/beethoven/diabelli/331369-66763-01-20.flac
but not
2011-08-10 12:37 /media/audio/16bit/saint_saens/saint_saens.flac
which it reported as unchanged.
Surely they should both have been reported as unchanged?

newones.txt is dated 2011-08-18 00:00

Any help would be appreciated.

- Richard
Richard Kimber
Political Science Resources

More information about the ubuntu-users mailing list