<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://t2bwiki.iihe.ac.be/index.php?action=history&amp;feed=atom&amp;title=PnfsScripts</id>
	<title>PnfsScripts - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://t2bwiki.iihe.ac.be/index.php?action=history&amp;feed=atom&amp;title=PnfsScripts"/>
	<link rel="alternate" type="text/html" href="https://t2bwiki.iihe.ac.be/index.php?title=PnfsScripts&amp;action=history"/>
	<updated>2026-05-16T07:16:22Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.3</generator>
	<entry>
		<id>https://t2bwiki.iihe.ac.be/index.php?title=PnfsScripts&amp;diff=212&amp;oldid=prev</id>
		<title>Maintenance script: Created page with &quot; first use: &lt;pre&gt; ./listFilesInDirectory.py lists all files in a directory and their pnfsid and the pool they reside on Mandatory options: --directory=           : direct...&quot;</title>
		<link rel="alternate" type="text/html" href="https://t2bwiki.iihe.ac.be/index.php?title=PnfsScripts&amp;diff=212&amp;oldid=prev"/>
		<updated>2015-08-26T12:28:56Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot; first use: &amp;lt;pre&amp;gt; ./listFilesInDirectory.py lists all files in a directory and their pnfsid and the pool they reside on Mandatory options: --directory=           : direct...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
first use:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./listFilesInDirectory.py&lt;br /&gt;
lists all files in a directory and their pnfsid and the pool they reside on&lt;br /&gt;
Mandatory options:&lt;br /&gt;
--directory=           : directory to investigate&lt;br /&gt;
Optional:&lt;br /&gt;
--pool=                : show only files that match the pool regexp&lt;br /&gt;
-h, --help             : print this help message&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
example use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./listFilesInDirectory.py --directory=/pnfs/iihe/cms/store/user/gvonsem/Skimmed-TopTrees/VLQ_MuonSkim_53X_v5_DataTopTreeId3446_Run2012C-22Jan2013-v1/13072013_122423/&lt;br /&gt;
files in /pnfs/iihe/cms/store/user/gvonsem/Skimmed-TopTrees/VLQ_MuonSkim_53X_v5_DataTopTreeId3446_Run2012C-22Jan2013-v1/13072013_122423/:&lt;br /&gt;
TopTree_Skimmed_278.root        00110000000000000CE4CF68        behar082_5&lt;br /&gt;
TopTree_Skimmed_172.root        00110000000000000CE48570        behar030_1&lt;br /&gt;
TopTree_Skimmed_244.root        00110000000000000CE4B708        behar070_2&lt;br /&gt;
TopTree_Skimmed_316.root        00110000000000000CE4E340        behar070_2&lt;br /&gt;
skim.xml        00110000000000000CE35DD8        behar080_2&lt;br /&gt;
TopTree_Skimmed_24.root 00110000000000000CE37E40        behar033_1&lt;br /&gt;
TopTree_Skimmed_197.root        00110000000000000CE49288        behar080_2&lt;br /&gt;
TopTree_Skimmed_210.root        00110000000000000CE49FD0        behar082_3&lt;br /&gt;
TopTree_Skimmed_269.root        00110000000000000CE4C680        behar082_2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./listFilesInDirectory.py --directory=/pnfs/iihe/cms/store/user/gvonsem/Skimmed-TopTrees/VLQ_MuonSkim_53X_v5_DataTopTreeId3446_Run2012C-22Jan2013-v1/13072013_122423/ --pool=behar034&lt;br /&gt;
files in /pnfs/iihe/cms/store/user/gvonsem/Skimmed-TopTrees/VLQ_MuonSkim_53X_v5_DataTopTreeId3446_Run2012C-22Jan2013-v1/13072013_122423/:&lt;br /&gt;
TopTree_Skimmed_387.root        00110000000000000CE51548        behar034_2&lt;br /&gt;
TopTree_Skimmed_400.root        00110000000000000CE52130        behar034_2&lt;br /&gt;
TopTree_Skimmed_416.root        00110000000000000CE52B70        behar034_2&lt;br /&gt;
TopTree_Skimmed_297.root        00110000000000000CE4DB20        behar034_2&lt;br /&gt;
TopTree_Skimmed_310.root        00110000000000000CE4DE70        behar034_1&lt;br /&gt;
TopTree_Skimmed_191.root        00110000000000000CE49268        behar034_2&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This script also creates the file &amp;quot;selectedFiles&amp;quot; containing all the files in the directory.&amp;lt;br&amp;gt;&lt;br /&gt;
It also shows the pnfsid and the pool the file resides on.&amp;lt;br&amp;gt;&lt;br /&gt;
You can select only the files in pools matching a certain pattern by adding the --pool= option.&amp;lt;br&amp;gt;&lt;br /&gt;
The resulting files are also written to the &amp;quot;selectedFiles&amp;quot; file.&amp;lt;br&amp;gt;&lt;br /&gt;
this file can then be used as input for the next script to move them to a different pool.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./move_files_to_different_pool.py&lt;br /&gt;
Mandatory options:&lt;br /&gt;
--destination         : destination pool&lt;br /&gt;
--file                : file to be moved&lt;br /&gt;
OR&lt;br /&gt;
--fileList            : file contining list of files to be moved&lt;br /&gt;
Optional:&lt;br /&gt;
-h, --help            : print this help message&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
example use:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./move_files_to_different_pool.py --fileList=selectedFiles --destination=behar080_2&lt;br /&gt;
&lt;br /&gt;
Will move 00110000000000000CE35DD8 from behar034_2 to behar080_2&lt;br /&gt;
&lt;br /&gt;
[maite.iihe.ac.be] (local) admin &amp;gt; cd behar034_2&lt;br /&gt;
&lt;br /&gt;
[maite.iihe.ac.be] (behar034_2) admin &amp;gt; migration move -pnfsid=00110000000000000CE35DD8 behar080_2&lt;br /&gt;
&lt;br /&gt;
[2] INITIALIZING migration move -pnfsid=00110000000000000CE35DD8 -- behar080_2&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{TracNotice|{{PAGENAME}}}}&lt;/div&gt;</summary>
		<author><name>Maintenance script</name></author>
	</entry>
</feed>