mersenneforum.org  

Go Back   mersenneforum.org > Extra Stuff > Linux

Reply
 
Thread Tools
Old 2005-02-04, 07:09   #1
leifbk
 
leifbk's Avatar
 
May 2004
Oslo, Norway

7816 Posts
Default File access Windows / Linux

I have mounted the C-disk on one of my Windows 2000 computers from Linux with smbfs. Is it safe to have a "tail -f results.txt" from the Windows computer running in an xterm on the Linux computer? DOS/Windows doesn't normally allow multiple programs to access the same file simultaneously, but how is it when the file is accessed remotely from another OS? And does tail -f qualify as "file access"?

I could of course just try, but I don't want to mess up my results.txt

BTW, does this question qualify for a FAQ?

regards, Leif.
leifbk is offline   Reply With Quote
Old 2005-02-04, 08:51   #2
xilman
Bamboozled!
 
xilman's Avatar
 
"π’‰Ίπ’ŒŒπ’‡·π’†·π’€­"
May 2003
Down not across

101010000000012 Posts
Default

Quote:
Originally Posted by leifbk
I have mounted the C-disk on one of my Windows 2000 computers from Linux with smbfs. Is it safe to have a "tail -f results.txt" from the Windows computer running in an xterm on the Linux computer? DOS/Windows doesn't normally allow multiple programs to access the same file simultaneously, but how is it when the file is accessed remotely from another OS? And does tail -f qualify as "file access"?

I could of course just try, but I don't want to mess up my results.txt

BTW, does this question qualify for a FAQ?

regards, Leif.
I used to do something like that all the time when at MSR, so it should work for you. Yes, Microsoft Research did run a few Linux and BSD systems (and still does, AFAIK), and using SFU to get a Unix-like environment on a Windows box was quite common.

Beware: Windows has different buffering behaviour when IO redirection is in place. You will very probably find that the tail -f hangs around for a long time and then spits out 4k all at once.

First time I've ever seen anyone ask the question.

Paul
xilman is offline   Reply With Quote
Old 2005-02-04, 09:39   #3
leifbk
 
leifbk's Avatar
 
May 2004
Oslo, Norway

23·3·5 Posts
Default

Quote:
Originally Posted by xilman
I used to do something like that all the time when at MSR, so it should work for you.
Thank you, Paul. It seems to work, as I thought that it should -- but I wanted a second opinion on it.

Quote:
Originally Posted by xilman
Beware: Windows has different buffering behaviour when IO redirection is in place. You will very probably find that the tail -f hangs around for a long time and then spits out 4k all at once.
I don't see that behaviour here. The result pops up in my xterm window as soon as it's written to disk on the Windows box. But then, this is not an actual redirection in the technical sense, is it?

Quote:
Originally Posted by xilman
First time I've ever seen anyone ask the question.
Well, - one time has to be the first, as we say here in Norway

regards, Leif.
leifbk is offline   Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Windows concurrent output to the screen and a file. petrw1 Homework Help 14 2018-04-26 22:45
P95 - Windows 7 - Unable to open log file ThomRuley PrimeNet 2 2017-01-15 20:43
Mfaktc file access error. storm5510 GPU Computing 16 2016-10-19 16:33
Windows batch file for NFS - any help? f1pokerspeed Programming 9 2013-12-24 18:21
Missing Help File in Windows pintoj Information & Answers 2 2009-06-18 17:12

All times are UTC. The time now is 07:01.


Sat Jul 17 07:01:13 UTC 2021 up 50 days, 4:48, 1 user, load averages: 1.92, 1.85, 1.76

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.