Find the answer to your Linux question:
Results 1 to 3 of 3
Dear all my system time was not update when I compiled my project last time and now after adjusting the system time/date compiler report clock skew error. I have many ...
  1. #1
    ARH
    ARH is offline
    Just Joined!
    Join Date
    Apr 2009
    Posts
    11

    Cool [SOLVED] How to Touch all the files in a project folders

    Dear all

    my system time was not update when I compiled my project last time and now after adjusting the system time/date compiler report clock skew error.
    I have many source folders in my project and I can not Touch files in each folder by this command :
    $touch *

    are there any other command to touch all the files in the project folders recursively ?

    note that I am using Fedora 10.

  2. #2
    Just Joined!
    Join Date
    Apr 2009
    Posts
    17
    Quote Originally Posted by ARH View Post
    Dear all

    my system time was not update when I compiled my project last time and now after adjusting the system time/date compiler report clock skew error.
    I have many source folders in my project and I can not Touch files in each folder by this command :
    $touch *

    are there any other command to touch all the files in the project folders recursively ?

    note that I am using Fedora 10.
    You could use a small script to do it:
    for i in `ls -1`
    do
    touch $i
    done

    Hope this helps. Make sure you execute this script from the dircetory which you want the date changed.

  3. #3
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    8,974
    Code:
    find dir_name -type f -exec touch {} \;
    This will touch all the files under dir_name.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...