Quantcast
Channel: Active questions tagged linux-kernel - Stack Overflow
Viewing all articles
Browse latest Browse all 12244

open-file-description table is not like what Tanenbaum described in Ubuntu?

$
0
0

In the book Modern Operating System, the author explained that if the shell script has two commands, p1 and p2 and each takes turn writing into a file x, the position where p1 finishes will be remembered by p2, as they are using the same open-file-description table. I test this with a simple script.

#!/bin/bashecho 11 > a.txtecho 12 > a.txt

It turns out that the second command overwrites the file completely.Anything wrong with the script or the implementation?


Viewing all articles
Browse latest Browse all 12244

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>