Weird behavior with find command when tarring files
From: Hameed, Amir <Amir.Hameed_at_xerox.com>
Date: Thu, 18 Oct 2018 20:56:34 +0000
Message-ID: <DM6PR11MB27806613DED2790D10F6EB28F4F80_at_DM6PR11MB2780.namprd11.prod.outlook.com>
Hi,
I am using the find command to TAR up files that are older than 4 hours:
Date: Thu, 18 Oct 2018 20:56:34 +0000
Message-ID: <DM6PR11MB27806613DED2790D10F6EB28F4F80_at_DM6PR11MB2780.namprd11.prod.outlook.com>
Hi,
I am using the find command to TAR up files that are older than 4 hours:
find . type f -mmin +239 | xargs tar -cvf /tmp/test.tar
The command tars up files and seems to finish fine. However, when I untar and count the number of files against the count of files that should have been captured (find . type f -mmin +239 | xargs ls -l | wc -l) there is a huge difference and the files captured by tar were way less than the file listed for the same time.
This is a strange behavior. What am I doing wrong (I am sure I am doing something wrong)?
Thanks,
Amir
-- http://www.freelists.org/webpage/oracle-lReceived on Thu Oct 18 2018 - 22:56:34 CEST