bug-fileutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: touch


From: Bob Proulx
Subject: Re: touch
Date: Fri, 14 Feb 2003 16:50:11 -0700
User-agent: Mutt/1.3.28i

Roy Finke wrote:
> Are there any plans to add the -R (recursive) option to the touch command?
> I need all files in all sub-directories to have today's timestamp.

I can't speak for the maintainers but I can't see any reason to add
'find' capability to the utilities.  It just bloats those commands.
See the FAQ for details.  Look for "built in directory recursion" for
one part and "Argument list too long" for another part.

  http://www.gnu.org/software/fileutils/doc/faq/

Just use 'find' and 'xargs' to do what you want.

  find ./dir -print0 | xargs -r0 touch

The -print0 and -0 options uses null terminated strings which handle
filenames with any weird character in them.  The -r option tells xargs
not to run the command at all if the directory is empty.

Bob




reply via email to

[Prev in Thread] Current Thread [Next in Thread]