windows - Tar and --newer / --after-date parameter -


my project structure following:

-sprint41  -file1  -file2 -sprint40  -file1  -file2 
  • all files(+ sprint41) in sprint41 folder have modified date 20130807
  • all files(+ sprint40) in sprint40 folder have modified date 20130610

i want create archive including files(+folder) after 20130715. command following:

tar -cf test.tar --after-date 20130715 * 

after command, test.tar contains following:

-sprint41  -file1  -file2 -sprint40 

it keeping sprint40 folder though modified date before 20130715

i expecting have following:

-sprint41  -file1  -file2 

do have clue ?

many thanks

yeah, problem tar still include directories if empty. it's checking --newer option on files, not directories. going have either write small script or use find -cnewer , pipe output tar (with --no-recursion on tar command).

create file timestamp want with

 touch -t 201307150000 timefile.txt 

then somthing like:

find . -cnewer timefile.txt -print0 | xargs -0 tar --no-recursion -cf test.tar 

Comments

Popular posts from this blog

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -