public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: ajshower <ajshower@gmail.com>
To: cygwin@cygwin.com
Subject: Redirecting output from running proc doesn't modify the "last modified time" field for target file
Date: Fri, 02 Dec 2011 16:51:00 -0000	[thread overview]
Message-ID: <32903475.post@talk.nabble.com> (raw)


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

             reply	other threads:[~2011-12-02 16:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-02 16:51 ajshower [this message]
2011-12-02 17:20 ` Jon Clugston
2011-12-02 18:43   ` ajshower
2011-12-02 18:50     ` Jon Clugston
2011-12-02 20:05       ` Eric Blake
2011-12-03 20:37         ` Corinna Vinschen
2011-12-03 20:58           ` Christopher Faylor
2011-12-02 20:23   ` Eliot Moss

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=32903475.post@talk.nabble.com \
    --to=ajshower@gmail.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).