Changing the date and time on all files within a folder structure

Source : http://www.bradleymedia.org/touch-subfolders/

This is easily achieved by combining the touch command with the Linux find command using the dash exec action like :-

find * -exec touch {} \;
 
 
A better approach is to use the touch command with the dash t switch and specify 
an actual date and time. The example below will set all files to being modified at
ten a.m. on the 29th of Feb 2012.
 
find * -exec touch -t 201202291000 {} \; 

0 comments:

 
Copyright © peyotest