How i can execute more than one command at the same time ? (OS = sun solaris)

command-line-interfacesolaris

how i can execute more than one command at the same time ? (OS = sun solaris)

Best Answer

Glad to see you're willing to learn shell as I suggested earlier in another question. :-)

To put command in background and let it execute there:

yourcommand &

To switch back to that process (if only one background process started):

fg

To list all backgrounded processes:

jobs -l

If you just want to run a command, then another, and then another ....

yourcommand && yourothercommand && youryetanothercommand

The above example would proceed to the next command only if the previous command succeeded without errors. If you don't mind if the previous command succeeded or not, you can do

yourcommand; yourothercommand; youryetanothercommand

Also, command screen will be your new best friend. It allows you to start a process in its own "screen", which you can detach and reattach later, so you can, for example, connect to a server from your company desktop computer, start a screen and let a long-running command run there, detach the session, walk to your company laptop, connect to that server with that, and reattach the session and see what's happened meanwhile.

Anyway, all this is the kind of basics I shouldn't be explaining to you; go and read a tutorial to get started! Just Google for bash tutorials, if your shell is bash. You seem to be using Solaris, so your shell might as well be csh, in that case google for csh tutorials. They are similar to each other, but some differences do apply for example in environment variable stuff.