From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4078 invoked by alias); 2 Dec 2011 16:51:49 -0000 Received: (qmail 4070 invoked by uid 22791); 2 Dec 2011 16:51:48 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from sam.nabble.com (HELO sam.nabble.com) (216.139.236.26) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 02 Dec 2011 16:51:30 +0000 Received: from isper.nabble.com ([192.168.236.156]) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1RWWKg-0003Hv-1y for cygwin@cygwin.com; Fri, 02 Dec 2011 08:51:30 -0800 Message-ID: <32903475.post@talk.nabble.com> Date: Fri, 02 Dec 2011 16:51:00 -0000 From: ajshower To: cygwin@cygwin.com Subject: Redirecting output from running proc doesn't modify the "last modified time" field for target file MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com X-SW-Source: 2011-12/txt/msg00023.txt.bz2 I've got a bash script running in Cygwin whose output has been redirected to another file. MS-DOS exhibits this same behavior if I run the bash script as a batch job. bash.exe &> log.txt Adding content to log.txt through redirection does not change log.txt's last modified time while bash.exe is executing. Baseline: # ls -la --full-time log.txt -r-xr-x---+ 1 user Domain Users 66455 2011-11-30 16:16:45.246664800 -0500 log.txt Some time later: # ls -la --full-time log.txt -r-xr-x---+ 1 user Domain Users 66838 2011-11-30 16:16:45.246664800 -0500 log.txt Note that even though log.txt has gotten larger, the last modified time has not changed. The last modified time is updated only when bash.exe terminates. Ubuntu 11.04 handles this scenario, IMO, correctly. Is there a way I can get the last modified time to be updated when the content of the file changes and while bash.exe is executing? Cygwin: CYGWIN_NT-6.1 MS-DOS: Microsoft Windows [Version 6.1.7601] Thanks -- View this message in context: http://old.nabble.com/Redirecting-output-from-running-proc-doesn%27t-modify-the-%22last-modified-time%22-field-for-target-file-tp32903475p32903475.html Sent from the Cygwin list mailing list archive at Nabble.com. -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple