rm command function using c program | os cs8461 | 4th sem of cse | operating system lab | QT

Опубликовано: 03 Ноябрь 2024
на канале: Quick Through
239
8

********** Welcome to Our Youtube Channel *************
operating system laboratory for cse engineering playlist
   • Operating System  

rm command function using c program | os cs8461 | 4th sem of cse | operating system lab | QT
Exp 3d rm command

Aim
To simulate rm command using UNIX system call.

Algorithm
1. Get filename as command-line argument.
2. Open the file in read-only mode using read system call.
3. If file does not exist, then stop.
4. Close the file using close system call.
5. Delete the file using unlink system call.
6. Stop.