0% found this document useful (0 votes)
36 views

Flags Use in The Open System Call

The document describes flags used in the open() system call. It shows bitwise OR operations combining the O_RDWR, O_APPEND, O_CREAT, and O_TRUNC flags. The open() call will open a file for read and write, append data, create the file if it doesn't exist, and truncate or clear existing file contents.

Uploaded by

Chiara Rucco
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views

Flags Use in The Open System Call

The document describes flags used in the open() system call. It shows bitwise OR operations combining the O_RDWR, O_APPEND, O_CREAT, and O_TRUNC flags. The open() call will open a file for read and write, append data, create the file if it doesn't exist, and truncate or clear existing file contents.

Uploaded by

Chiara Rucco
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

1 1 0 0 0 0 0 1 0 1 0

O_TRUNC O_CREAT O_APPEND O_RDWR

open(“a file”, O_RDWR | O_APPEND | O_CREAT | O_TRUNC, FILE_MODE);

Flags use in the open( ) system call

You might also like