xrd.pl is a command line tool that allows a user to query xrootd in order to stat, remove or checksum a file. For a full listing of the supported commands see the description below or run xrd.pl -h to get a help print out.
xrd.pl [OPTIONS] [ACTION] [filename|xrootdurl]
--debug dbgLvl set set debug level for xrootd communication.
--verbose be verbose.
--server XrdSrv Xrootd server to connect to.
--where print the xrd server name after the last command has been executed.
--help print this help.
stat <fname> stat a file
checksum <fname> checksum a file. A stat is issued before the checksum.
checksumonly <fname> issue only a checksum cmd no stat. works only angainst a data server
rm <fname> remove Fname (ES: 0 = success, 1 = failure)
mv <Src> <Trg> move a file within a data server from src to trg
dir <dirname> list a directory. Has to run against data server.
There are two ways to specify the xrootd file name.
xrd.pl -s glast-rdr stat /glast/mc/testfile
xrd.pl stat root://glast-rdr//glast/mc/testfile
(The annoying version line of XrdClientAdmin has been omitted)
xrd.pl -s glast-rdr stat /glast/wilko/f1
size 37 onDisk 1 flags 48 modTime 1178659009 Tue May 8 14:16:49 2007 /glast/wilko/f1
xrd.pl -s glast-rdr -w stat /glast/wilko/f1
size 37 onDisk 1 flags 48 modTime 1178659009 Tue May 8 14:16:49 2007 /glast/wilko/f1
currentHost silky02.slac.stanford.edu
xrd.pl -s glast-rdr checksum /glast/wilko/f1
checksum 3146320528 size 37 CRC crc32 /glast/wilko/f1
xrd.pl dir root://sulky47//glast/mc
DC2
ServiceChallenge
junk