Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

closed as not a real question by Dennis Kaarsemaker, EEAA, voretaq7 Jun 11 '13 at 0:38

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

    
You don't tell us what operating system you're running. Such information would be important... –  voretaq7 Jun 11 '13 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. –  user2344668 Jul 11 '13 at 17:45

2 Answers 2

up vote 1 down vote accepted

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

share|improve this answer
    
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. –  user2344668 Jul 11 '13 at 17:47
    
np, if you need more help on this message me I guess if this is closed. Good luck! –  ben Mar 4 at 20:16

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

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.