LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Command to forward files to folder (https://www.linuxquestions.org/questions/linux-newbie-8/command-to-forward-files-to-folder-349623/)

TubeScreamer 08-03-2005 11:55 AM

Command to forward files to folder
 
This might be an incredibly dumb question... but I was wondering if there was anyway that when you run a program, you can automatically put the files that the program makes into a specified folder. For instance:

mpiexec -n 2 /*arguments*/ /*put something here?*/

Is there something I can put at the end of the command to tell it to put the files that the program creates into a specific folder? Thanks for your help.

cyber-worx 08-03-2005 01:08 PM

Do you mean the output of the program?

In which case you should read up on stream redirection...

mpiexec -n 2 /*arguments*/ /*put something here?*/ > /somedir/somefile

will divert the output to somefile

TubeScreamer 08-03-2005 01:33 PM

No, I don't mean the output... the program creates a whole bunch of .txt files and I was hoping to divert them to a folder. Any ideas?

JimBass 08-03-2005 02:57 PM

What cyber-worx wrote is still true, text files count as output too! Although, I have no idea how this mpiexec behaves. If it is coded in such a way that the output is sent to a specific folder, than you would have to go into the mpiexec config or binary and change that output. If it just creates the text in the directory you run it in, than you should be easily able to redirect the output.

Peace,
JimBass


All times are GMT -5. The time now is 02:59 PM.