0

I am new to linux.I want to that how to find out through terminal that if any system command uses specific system call internally? Suppose hard linking is to be performed . So "ln" command uses li nk() system call internally. Likewise rm command uses unlink() system call.

1
  • The question is not clear and needs more details. Do you wan to find out if a specific program/command uses a certain system call? Or do you want to monitor a running system to find out which program(s) use a specific system call? Commented Jul 11, 2021 at 21:53

1 Answer 1

0

You can follow the system calls used by a program with strace. For example

strace -f ls

There are many options, see man strace on your system or online for details, including the ability to filter its output to show only selected system calls, input/output, etc.

Note that if you strace a setuid/setgid program, for example /usr/bin/passwd (setuid root), the target application's privileges will be discarded during the trace.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.