[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Script vs command line behaviour



Le duodi 22 vendémiaire, an CCXXV, Mark Fletcher a écrit :
> > strace -f -e execve -s 10000 -o /tmp/my_script.$$.$(date +%Y%m%d%H%M%S) &

> But there is no my_script.<anything> in /tmp... WhaFu?

My bad, I forgot the end of the command:

-p $$

(insert just before the final ampersand)

Command explained:

strace: traces all system calls and signalx of a process;
-f: trace across forks and new processes;
-e execve: only trace the execve system call, i.e. executing a new command;
-s 10000: truncate stings with a very high limit;
-o /tmp/...: dump output in a file with an unique name;
-p $$: trace the calling shell;
&: run in background.

Regards,

-- 
  Nicolas George

Attachment: signature.asc
Description: Digital signature


Reply to: