Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Ubuntu User (http://www.linux-archive.org/ubuntu-user/)
-   -   Odd question re linux & caches (http://www.linux-archive.org/ubuntu-user/708561-odd-question-re-linux-caches.html)

Gene Heskett 09-30-2012 06:57 PM

Odd question re linux & caches
 
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?

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

Liam Proven 09-30-2012 07:05 PM

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.

--
Liam Proven • Profile: http://lproven.livejournal.com/profile
Email: lproven@cix.co.uk • GMail/G+/Twitter/Flickr/Facebook: lproven
MSN: lproven@hotmail.com • Skype/AIM/Yahoo/LinkedIn: liamproven
Tel: +44 20-8685-0498 • Cell: +44 7939-087884

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users


All times are GMT. The time now is 01:15 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.