linux - How to understand the file access mode Write only in the file descriptor table?
某草草
某草草 2017-06-12 09:24:34
0
1
819

File descriptors in the operating system have a file descriptor table maintained by the kernel at the system level. The status information contained in it includes file access modes, and there are three types

  1. read only

  2. write only

  3. read&write

What is the situation of write only? What I can imagine is writing with the ">>" character in terminal mode, but I don't know how to use it in the gui interface, such as various text editors. How to implement this write only without viewing the file content

某草草
某草草

reply all(1)
左手右手慢动作

Don’t be confused by the gui. Taking the editor as an example, it naturally has to be read out to the user before the user can write.

But many times, you can write without reading the file content. For example, the log keeps appending content to the end of the file, and the previous content is not read.

But I don’t know how to implement this write only under the gui interface, such as various text editors, without viewing the file content

How to do it? Of course, the operating system (the file system) does this permission restriction, and the application layer program only applies for these permissions. For example, the editor must have read permission. Without write permission, you cannot edit, or at least you must be able to read.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!