How to delete a file without using remove system call in a C program?

前端 未结 5 896
抹茶落季
抹茶落季 2021-01-06 02:39

I\'ve been curious how rem in Linux works and trying to write my own C code that can delete a file but when I searched for the answer, I only got t

5条回答
  •  [愿得一人]
    2021-01-06 03:16

    The traditional way to delete a file is to use the unlink(2) function, which is called from remove(3), if path is a file.

提交回复
热议问题