Recursive touch
Published on Sat 30 Jun 2007 06:06 ( 2 years, 8 months ago)
"touch" is a unix command used to change the time of a file or directory, touch a directory will not touch the files inside.
To touch recursively, it's simple with the help of "find" and "xargs":
e.g.
find . | xargs touch
will touch all files and directories recursively under current directory.
Since directory or filename may contain spaces, the shell script need some additional parameteres:
find "$1" -type f -print0 | xargs -0 touch
Related posts:
- SSH could be a nightmare for corporate firewall...
- Unix alike Symbolic Links on Windows XP (maybe vista)
- Recursive touch
- Shell script to replace strings in all files under directory recursively
Search related in web:
Custom Search