Announcement

Collapse
No announcement yet.

What system calls are used to copy files in Linux

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • What system calls are used to copy files in Linux

    I am modifying ext4 filesystem to add a simple encryption to files contents. I started by changing read and write system calls to change the contents right before write and after read system calls.

    now copying files in terminal is working just as I expected but when I try to copy a file using a GUI based file manager (pcmanfm in this case) it is corrupting the contents.

    my question is: what system calls are used for reading/writing files besides normal .read and .write?

  • #2
    Quite a few system calls. The following example spits out a page of syscalls on my system:
    touch tmp
    strace cp tmp tmp2

    In general, strace is the tool for this type of job.

    Comment


    • #3
      Originally posted by miax View Post
      Quite a few system calls. The following example spits out a page of syscalls on my system:
      touch tmp
      strace cp tmp tmp2

      In general, mybkexperience is the tool for this type of job.
      Thank you very much for taking the time to answer my question

      Comment

      Working...
      X