How to touch a file for testing -C

2001-05-24 Thread Mark Folse

I was written a small application to check the date of the files to
process, and sleep until the new days's files arrived. My problem was
testing. Is there someway not in the man pages to touch a file so
that the return from -C reflects the new file system date and time?


=

-
Notice: This e-mail is protected by the U.S. Constitution and the U.N. Declaration of 
Human Rights. Unauthorized interception by any public or private agency is an ugly 
sort of work to be in. Does your mother know you spend your days reading other 
people's mail? Would she be proud of you?Please visit: 
http://clubs.yahoo.com/clubs/district41democrats

__
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/



Re: How to touch a file for testing -C

2001-05-24 Thread Walt Mankowski

On Thu, May 24, 2001 at 11:00:19AM -0700, Mark Folse wrote:
 I was written a small application to check the date of the files to
 process, and sleep until the new days's files arrived. My problem was
 testing. Is there someway not in the man pages to touch a file so
 that the return from -C reflects the new file system date and time?

Why does it have to not be in the man pages?  :-)

$ perldoc -f utime
 utime LIST
 Changes the access and modification times on each
 file of a list of files.  The first two elements of
 the list must be the NUMERICAL access and
 modification times, in that order.  Returns the
 number of files successfully changed.  The inode
 change time of each file is set to the current time.
 This code has the same effect as the touch command
 if the files already exist:

 #!/usr/bin/perl
 $now = time;
 utime $now, $now, @ARGV;

-- 
Walter C. Mankowski
Senior Software EngineerMyxa Corporation
phone: (610) 234-2626   fax: (610) 234-2640
email: [EMAIL PROTECTED]http://www.myxa.com