-1

I'm trying to run some php files that have output and can take up to an hour to run, but I don't need to see the output as its writing to a log file (or I can push output to a log file) and I want to be able to run commands while its running (I don't care to be notified in any way that it's done; I can just go check the log file). How would I do this?

2
  • You don't tell us what operating system you're running. Such information would be important...
    – voretaq7
    Jun 11, 2013 at 0:38
  • Sorry, it's Linux. They all behave the same way that I've ever seen on any of them in regards to this issue though. I type a command, it sits there outputting while I wait. I simply want to have it bring me back to the command line while it runs, whether it has output or not. Like, I want to funnel the output to /dev/null or something. I'm running CentOS 6.3 by the way. Jul 11, 2013 at 17:45

2 Answers 2

1

Two ways to do this

command

ctrl-Z to interrupt

jobs

(list all jobs in your current shell, assuming there is only one)

bg

will take the top job in your queue and put it in the background

Or, just start it in the background from the beginning

command &

Any STDERR or STDOUT will show up on the screen so you will want to redirect those to a file

2
  • OK, I think this brings me closer. I don't know why you're the only one to understand my question or why this isn't a more asked-about issue. The admins closed this as not a real question yet you got it! Thanks. Jul 11, 2013 at 17:47
  • np, if you need more help on this message me I guess if this is closed. Good luck!
    – ben
    Mar 4, 2014 at 20:16
1

Use a different ssh session or use a terminal multiplexer like GNU Screen or tmux.

Not the answer you're looking for? Browse other questions tagged .