使用文件* .dat从父文件夹运行qsub命令到下面的所有目录 [英] Run a qsub command from a parent folder to all directories below with a file *.dat
问题描述
我正在使用Redhat和pbs排队系统将作业提交给有限元分析代码。我通常有一个文件夹,其中包含我要运行的.dat文件和将提交.dat文件的.pbs文件。要提交.dat文件,我将在包含两个文件的目录中运行命令 qsub * .pbs。
I am using Redhat and a pbs queuing system to submit jobs to finite element analysis code. I typically have a folder that contains a .dat file, which is what I want to run, and a .pbs file that will submit the .dat file. To submit the .dat file I would run the command "qsub *.pbs" in the directory containing both files.
如何提交或仅运行 qsub *。 pbs(包含.dat文件的目录之外)。我通常是.dat文件之后的两个目录。
How could I submit or just run "qsub *.pbs" from outside of the directories containing the .dat files. I would typically be two directories up from the .dat files.
谢谢
推荐答案
您可以执行查找并执行
查找/ tmp / foo -name * .pbs -exec qsub {} \ \;
这里是我进行的测试
[spuder@moab tmp]$ mkdir /tmp/torqueFun
[spuder@moab tmp]$ cd !$
[spuder@moab torqueFun]$ touch foo.pbs
[spuder@moab torqueFun]$ touch bar.pbs
[spuder@moab torqueFun]$ touch foobar.pbs
[spuder@moab torqueFun]$ find . -name "*.pbs" -exec qsub {} \;
19185.moab.novalocal
19186.moab.novalocal
19187.moab.novalocal
这篇关于使用文件* .dat从父文件夹运行qsub命令到下面的所有目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!