title: Unix shell script: Update timestamp on all sub-directories and sub-files, including those with spaces
body: <p>Here's what I'm trying to achieve.</p>
  
  <p>I have a directory with over 4200 sub-files/sub-directories, all of which need to be set to a certain timestamp.</p>
  
  <p>This is a problem because many of them have whitespaces and other weird characters.</p>
  
  <p>First thing I tried:</p>
  
  <pre><code>touch $(find .)</code></pre>
  
  <p>Won't work because of the spaces. It will update the timestamps on all files and directories that are space-free, but those that are not, do not receive the new timestamp. In addition, as one might expected, it creates files in the root directory corresponding to the elements of filenames with spaces. So if I have a file somewhere named "One Two Three", 'touch' creates the 3 files, "One", "Two" and "Three" in the root. This by itself can be remedied by using -c with 'touch', but of course it still won't update the file with the spacey name.</p>
  
  <p>The second thing I tried was:</p>
  
  <pre><code>for FILENAME in $(find .); do touch -t 201007162310.00 "$FILENAME"; done</code></pre>
  
  <p>But it's the same story.</p>
  
  <p>I've found a couple of results online, but they're all trying to achieve something differently and so suggest ways that won't work for me.</p>
  
  <p>So now I'm lost. Any ideas?</p>
  
  <p>Is it really not possible to make the 'find' command prepend and append each line with a quotation mark or something?</p>
  
  <p>EDIT: This needs to be done via shell script. Using Perl, PHP or any other environment will not help. I could easily do this with anything else than Unix shell scripting, but it has to be in a Unix shell script, preferably not a big one.</p>