Help writing a shell script!
I need to write a shell script that determines what happens when the '>>' (append) operation accesses a file at the same time as another program. For example:
If two users logged on at the same time and a logfile was being written with the '>>' operation, does the file get accessed by both at the same time, therefore one is overwritten by the other becuase they were working on the same line, or does it wait? I just need ideas for how to test this, not the actual answer. Thank you. |
Sure sounds like homework.
|
Haha...yes indeed, but I am lost as to how to do it. I understand the concept, but am not sure how to launch two processes at the same time.
|
You could utilize the at deamon or even cron, but at would probably work better for you. Just add two jobs that write different output to the same file. By the system clock they will be simultaneous.
Regards, Alunduil |
i dont think that buffer for the both the instances at the same time. are u taking the log froma a single system?
|
open two xterms
and do cat >> file and what you type will go in the file. or find . >> file whatever |
All times are GMT -5. The time now is 06:34 AM. |