I was just bumfuzzled for several hours, here is the scenario:
I have an old TRS-80 Color Computer 3 in the basement, hooked up to this
box by 2 separate methods.
One is a very high speed (for the coco) network over its bitbanger port at
115 kilobaud.
Two is a shell (like bash) running on its hardware serial port, so I have a
remote login that doesn't support any gfx commands.
The first is called drivewire by its author and can access a file
containing an image of one of the coco's disks.
So, I 'touched' a file on this linux box, coupled to it by way of
drivewire's mount facility, formatted this image as a disk, and then wrote
a boot floppy image to it. I could unmount/eject it, and remount/insert it
and all the data was still there.
BUT, when I looked at it with linux 2 hours later with an ls -l, it was
still a zero length file! I had to access it with hexedit to verify that
the data was there & looked ok. After that, the proper file length of a
bit over 161k was then shown by an ls -l.
Is there some switch I can set which will cause linux to refresh its cache
when a file has been opened, written to and closed again?
Cheers, Gene
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
My web page: <http://coyoteden.dyndns-free.com:85/gene> is up!
When the government bureau's remedies don't match your problem, you modify
the problem, not the remedy.
--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
09-30-2012, 07:05 PM
Liam Proven
Odd question re linux & caches
On 30 September 2012 20:57, Gene Heskett <gheskett@wdtv.com> wrote:
> Greetings;
>
> I was just bumfuzzled for several hours, here is the scenario:
>
> I have an old TRS-80 Color Computer 3 in the basement, hooked up to this
> box by 2 separate methods.
>
> One is a very high speed (for the coco) network over its bitbanger port at
> 115 kilobaud.
>
> Two is a shell (like bash) running on its hardware serial port, so I have a
> remote login that doesn't support any gfx commands.
>
> The first is called drivewire by its author and can access a file
> containing an image of one of the coco's disks.
>
> So, I 'touched' a file on this linux box, coupled to it by way of
> drivewire's mount facility, formatted this image as a disk, and then wrote
> a boot floppy image to it. I could unmount/eject it, and remount/insert it
> and all the data was still there.
>
> BUT, when I looked at it with linux 2 hours later with an ls -l, it was
> still a zero length file! I had to access it with hexedit to verify that
> the data was there & looked ok. After that, the proper file length of a
> bit over 161k was then shown by an ls -l.
>
> Is there some switch I can set which will cause linux to refresh its cache
> when a file has been opened, written to and closed again?
>
Standard Unix behaviour, AIUI. Has the happy side-effect that you can
delete a file and it won't actually go anywhere until all open file
handles to it are closed. This means that you can update the binaries
of a program and it will keep running quite happily. That is why you
can update your Linux box without rebooting it unless the kernel has
changed, so really, it is a good thing and it's not going to change.
It's the reason Linux needs so much fewer reboots than Windows does.