]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/blob - cddl/contrib/dtracetoolkit/Examples/whatexec_example.txt
Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.
[FreeBSD/stable/10.git] / cddl / contrib / dtracetoolkit / Examples / whatexec_example.txt
1 The following are demonstrations of the whatexec.d script.
2
3
4 Here we run it while a few commands are also executed,
5
6    # ./whatexec.d
7    PEXEC            EXEC                                   OK TYPE
8    bash             /usr/bin/clear                          Y #!/u\0
9    bash             /sbin/sh                                Y \177ELF\0
10    clear            /usr/bin/tput                           Y \177ELF\0
11    bash             /export/home/brendan/DOOM.EXE           N MZ\644\0
12    ^C
13
14 whatexec.d has first found that "clear" was run, which has a type that
15 begins with "#!" - a script. clear runs "sh" and "tput", both ELF files.
16
17 We finish by attempting to run a MZ file, "DOOM.EXE", which is rejected
18 (OK is "N").