This is for academic purpose. I want to know which commands are executed when we do something in GUI, for example creating a folder. I want to show that both the mkdir shell command and create folder option from GUI does the same thing.
|
|
||||
|
You can observe what the process does with the strace command. Strace shows the system calls performed by a process. Everything¹ a process that affects its environment is done through system calls. For example, creating a directory can only be done by ultimately calling the To see what
You'll see a lot of calls other than To observe what a GUI program is doing, start it and only observe it during one action. Find out the process ID of the program (with
This puts the trace from process 1234 in the file You can select what system calls are recorded in the
To only record
¹ Ok, almost everything. Shared memory only involves a system call for the initial setup. |
|||
|
|
mkdir(the command) but themkdir()system function. This depends a lot on the GUI tool you use to do things, but I'd expect many of those to use system calls instead. – njsg Dec 29 '12 at 21:15