2 added 304 characters in body
source | link

I am posting as an answer because I can't comment

You can check the find command to get a list of the files that needs to be tared. You can specify a start and end date (up to seconds precision) using the normal -atime , -btime , -mtime ... arguments in combination with the -not argument. You can then pipe the output to xargs and then to tar. Check the man page of find for details about time arguments.

Update: As Anthon suggested, you may use the +/- modifiers with -mtime to specify the period without using -not. Here is an example:

find . -mtime -5d2h3m10s -mtime +4d0h15m20s -print0 | xargs -0 tar cjvf mytar.tar.bz2

Where d, h, m, s corresponds to days, hours, minutes and seconds respectively. This will give files modified newer than 5d2h3m10s and older than 4d0h15m20s

I am posting as an answer because I can't comment

You can check the find command to get a list of the files that needs to be tared. You can specify a start and end date (up to seconds precision) using the normal -atime , -btime , -mtime ... arguments in combination with the -not argument. You can then pipe the output to xargs and then to tar. Check the man page of find for details about time arguments.

You can check the find command to get a list of the files that needs to be tared. You can specify a start and end date (up to seconds precision) using the normal -atime , -btime , -mtime ... arguments in combination with the -not argument. You can then pipe the output to xargs and then to tar. Check the man page of find for details about time arguments.

Update: As Anthon suggested, you may use the +/- modifiers with -mtime to specify the period without using -not. Here is an example:

find . -mtime -5d2h3m10s -mtime +4d0h15m20s -print0 | xargs -0 tar cjvf mytar.tar.bz2

Where d, h, m, s corresponds to days, hours, minutes and seconds respectively. This will give files modified newer than 5d2h3m10s and older than 4d0h15m20s

1
source | link

I am posting as an answer because I can't comment

You can check the find command to get a list of the files that needs to be tared. You can specify a start and end date (up to seconds precision) using the normal -atime , -btime , -mtime ... arguments in combination with the -not argument. You can then pipe the output to xargs and then to tar. Check the man page of find for details about time arguments.