Sunday, May 5, 2024
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 2418  / 2 Years ago, thu, october 20, 2022, 1:23:50

I'm new in Ubuntu and I have this question about strace ls command. When I'm run this command it gives all the system calls. What if I need to know the system calls for a specific command, for example if I run the command mkdir? I want to know what are the system calls for this particular command.



Its helps me a lot in my studies. Thank a lot.


More From » command-line

 Answers
0

Just like you do strace ls, you should do strace mkdir which will give you list of all calls made by mkdir like as sample below from my PC:



execve("/bin/mkdir", ["mkdir"], [/* 37 vars */]) = 0
brk(0) = 0x83da000
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7736000
........
.......


Hope this will solve your problem, but if you want to know about each syscall made then read its man pages or specifically ask about a syscall.


[#26779] Thursday, October 20, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ndeecru

Total Points: 109
Total Questions: 128
Total Answers: 117

Location: Czech Republic
Member since Thu, Aug 11, 2022
2 Years ago
ndeecru questions
Mon, Jun 20, 22, 04:53, 2 Years ago
Thu, Mar 10, 22, 18:53, 2 Years ago
Thu, Oct 14, 21, 20:53, 3 Years ago
Thu, Apr 28, 22, 10:16, 2 Years ago
;