How to find out what a command is executing in terminal on MacOs

After running the shell script (which invokes the bundle, other scripts depend on conditions that are too complex to understand), I can execute the "gdbclient" command on my macOS terminal.

But when I do "what gdbclient" and "alias gdbclient" it shows nothing. Is there anyway to find out what gdbclient actually does?

0


a source to share


4 answers


You can open another terminal window and type: ps

This will show all running processes.



If your script is running as a different user than the current one, you can use ps -ef to list all running processes.

If you know the PID of the process that started your script, you can find all child processes via the parent PID using ps -f | grep [pid]

0


a source


You can use Activity Monitor to check everything pretty thoroughly. To get the correct privileges to see everything happening, you can:



sudo open /Applications/Utilities/Activity\ Monitor.app/

      

0


a source


Dtrace can provide you with useful information: dtrace

0


a source


to find the "gdbclient" process:

ps aux | grep gdbclient

      

It won't tell you what it does, but what it works

0


a source







All Articles