bash - Ux modify timestamp -


i'm trying write ux script change timestamp (add 10years). working on debian no idea how on solaris (-d , + 10 years not working)

find directory -print | while read filename;    touch -d "$(date -r "$filename") + 10 years" "$filename" done 

it adds ten years in terms of 10*365*24*3600 seconds,

find directory -print|perl -mfile::stat -lne 'utime((stat($_)->mtime +10*365*24*3600) x2, $_)' 

in case file::stat not available,

find directory -print|perl -lne 'utime(((stat($_))[9] +10*365*24*3600) x2, $_)' 

Comments

Popular posts from this blog

php - Submit Form Data without Reloading page -

linux - Rails running on virtual machine in Windows -

php - $params->set Array between square bracket -