StressFree | David Harrison

Open source development & digital architectural collaboration

Recursive Touch Command

Submitted by David on 22 October 2005 - 1:30pm
Printer-friendly versionJust in case you need to set the last modified date of a whole directory structure to the current time use the following command:

find . -print0 | xargs -r0 touch

Very useful for file synchronisation purposes.


Tweak Time/Date

http://ss64.com/bash/touch.html Syntax touch [options]... File... Options -t [[CC]YY]MMDDhhmm[.ss] Set to a specific time.

The date is set to the current date

The touch command 'touches' a file setting its last modified date to what the system time is currently. This is useful in synchronisation processes especially when you have copied files from one location to another and in the process preserved the file's history.

THANK YOU THANK YOU THANK YOU!

Perfect! Exactly what I needed. Thanks!

How to set date

Where to specify date ? Thank you for your command but i didn't undestand how to use it ?

Related posts: