lunes, 24 de mayo de 2010

Copy single file to multiple directories

Parent_Directoy
Filename1
Child_Directory1
Child_Directory2
Child_Directory3
Child_Directory4
....
So I need to copy Filename1 to all of the Child_Directories.

<!--ntstart--><b>find <parent directory> -type d -exec cp <parent directory>/<Filename1> {}/ \;</b><!--ntend-->

or in a bourne/shell script :
If you have other junk in the parent dir but a pattern that matches all subdirs (eg Child_Directory*), you can do this (bourne/ksh/bash):
<!--ntstart--><b>for subdir in <parent directory>/<pattern> ; do cp <parent directory>/<Filename1> ${subdir}/ ; done</b><!--ntend-->


viernes, 21 de mayo de 2010

Delete Multiple Jobs

* Delete jobs with qdel*

>qdel 1908.titan.physics.umass.edu

or do it with a qselect to pick all of your jobs

> qdel `qselect -u bbrau`

Changing Node State (Torque)

A common task is to prevent jobs from running on a particular node by marking it offline with pbsnodes -o nodename. Once a node has been marked offline, the scheduler will no longer consider it available for new jobs. Simply use pbsnodes -c nodename when the node is returned to service.

Also useful is pbsnodes -l which lists all nodes with an interesting state, such as down, unknown, or offline. This provides a quick glance at nodes that migth be having a problem.

http://www.clusterresources.com/torquedocs21/3.3nodestate.shtml