in reply to Re: why does open ">..." sometimes touches the directory?
in thread why does open ">..." sometimes touches the directory?
That's right. As I said, the "open" that I am doing, is only _sometimes_ modifying the directory. I don't know why.
I would respectfully disagree with what some of the other Monks seem to be saying, is that overwriting a file, must touch the directory. As shown below.
the question is, why do my Perl scripts sometimes do it and sometimes don't - and I checked, all they do explicitly, is open for writing, and write, and close, not remove anything
The reason I care, is because I am a makefiles guy. As such, I don't want to touch _anything_ that does not need absolutely need to be touched, so that the system does not rebuild too much. Yes I do have dependencies on directories (meaning, their contents listing). When I do Perl scripts, sometimes, they will open an existing file for writing, and the directory gets touched. That's bad for me.
mgaleck{262}: touch test/foobar mgaleck{263}: ls -ld test drwxr-xr-x 2 mgaleck sw-team 138 Feb 5 03:30 test mgaleck{264}: date Tue Feb 5 03:31:12 PST 2013 mgaleck{265}: echo foobar > test/foobar mgaleck@hq1-up-swe-07{266}: ls -ld test drwxr-xr-x 2 mgaleck sw-team 138 Feb 5 03:30 test
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: why does open ">..." sometimes touches the directory?
by parv (Parson) on Feb 05, 2013 at 11:50 UTC | |
Re^3: why does open ">..." sometimes touches the directory?
by Anonymous Monk on Feb 05, 2013 at 11:45 UTC | |
Re^3: why does open ">..." sometimes touches the directory?
by Anonymous Monk on Feb 05, 2013 at 13:30 UTC |