martedì 13 marzo 2012

Linux - Eseguire in background con stdout e stderr su file

Comando per eseguire un file batch in background con stdoutput e stderror indirizzati su file:

nohup ./PRIMO_RUN_MS_0.1/PRIMO_RUN_MS/PRIMO_RUN_MS_run.sh >/job_log/stdout.log 2>&1 &


Il risultato sarà l'esecuzione del job "PRIMO_RUN_MS_0.1/PRIMO_RUN_MS/PRIMO_RUN_MS_run.sh" con stdoutput scritto su /job_log/stdout.log".
Anche lo stderror viene indirizzato sullo stesso file (2>&1).
L'esecuzione è in backgroup (è presente la &), quindi prosegue anche se viene chiuso il terminale

Nessun commento:

Posta un commento