open() System Call Program in Linux
HTML-код
- Опубликовано: 7 май 2020
- In this lecture on the open system call program in Linux you will learn how to write a program to get the file descriptor of user created file using the open() system call. The open() system call returns the file descriptor of the file on success. Pn failure, it returns -1.
Subscribe - / dextutor
This lecture is part of the Operating System Lab playlist: • Operating System Lab
For Program code and more details visit: dextutor.com/open-system-call/
Reference Videos:
1. Linux installation: • Linux Installation
2. Practice Programs: • System call open-lseek...
3. Viva Questions: • System calls viva ques...
Tools Required:
1. Linux environment
2. Basic knowledge of C Language
3. gcc compiler installed
Reference Links:
Operating System Theory PPTs Link: dextutor.com/courses/operatin...
Operating System Programs: dextutor.com/courses/operatin...
Other Playlists:
OS: • Operating System
Linux Essential: • Linux Tutorial For Beg...
RHCSA: • RHCSA Exam Full Course
Was this tutorial about the program on open system call helpful? If so, please share. Let me know your thoughts in the comments.
#linux #oslab #os #systemcalls
Awesome Content. Thank you :)
Thank you sir and please make videos on cpu scheduling algorithms like for FCFS,SJF etc.
Such grt vdos ❤
very good explanation
Thanks.. Share among your friends
solution for Q2 for exercise given on your web page?
Q2. Write a program using open() system call to copy the contents of one file into another file.
Can we use libraries of linux like in ubuntu for windows
Yes
Thanks a lot for your video. Could you please explain, what does 0642 in open("target",O_CREAT|O_WRONLY,0642); means?
These are the permissions on the file. 6 (read and write) for user, 4(read) for group and 2(write) for others. You can give any permissions you want. For details on permissions refer ruclips.net/video/wKZH-7P7YZE/видео.html
@@dextutor Thank you so much for your explanation :))
Plz make vedio in close system call
close(fd)
where fd is the file descriptor.. The use of close system call is to close the file pointed to by the file descriptor fd
How does content of file is saved in buf if we haven't assign it
The file descriptor of the file is passed as first argument in the read() system call
@@dextutor so basically it points towards the file and buff is used as memory
if we don't have any existinh file how we create it ?
You can use the touch command or any editor. Just watch this video
ruclips.net/video/t5CqOY7eTQI/видео.html
@DexTutor Why doesn't it have subtitles in Spanish?
No idea :-)
what is the purpose of 0 in 0642?
That bit can be used to set user-id, group-id or sticky bit
I am facing an error undeclared o_rdonly how to fix this even i have included all the libraries
Use All Caps.. Or share the code so that i can check
@@dextutor ok i will send you tomorrow
@@dextutor i used CAPS
How can i share code with you
dextutor@gmail.com