Print

Print


Hello,

Would it by any chance be possible to have XRootD command-line tools
(or at least some of them, 'xrd stat' for instance) provide a non-zero
return code if the queried file or directory does not exist? While not
an error per se, such an occurrence does in a way indicate that
operations on the file or directory in question will not succeed - and I
think it would both streamline the use of XRootD tools in scripts a bit
and provide an easier upgrade path for any software managers of CERN
experiments who now have to switch from RFIO to XRootD for CASTOR
access (CASTOR/RFIO command-line tools do provide this information). At
the moment this doesn't seem to work:


[show software version]
lxplus$ xrd
(C) 2004-2010 by the Xrootd group. Xrootd version: v3.2.7
Welcome to the xrootd command line interface.
Type 'help' for a list of available commands.
> exit
Goodbye.

[query existing directories: CASTOR, EOS]
lxplus$ xrd castorpublic stat /castor/cern.ch/user/m/mks
Id: 137983241792572159 Size: 0 Flags: 19 Modtime: 1333106123

lxplus$ echo $?
0

lxplus$ xrd eospublic stat /eos/na61/user/m/mks
Id: 14499809643263 Size: 0 Flags: 2 Modtime: 1377092760

lxplus$ echo $?
0

[query nonexistent files/directories: CASTOR, EOS]
lxplus$ xrd castorpublic stat /castor/cern.ch/user/m/mks/nothere
Error 3011: Unable to stat /castor/cern.ch/user/m/mks/nothere; No such file or directory

The command returned an error.

lxplus$ echo $?
0

lxplus$ xrd eospublic stat /eos/na61/user/m/mks/nothere
Error 3011: Unable to stat /eos/na61/user/m/mks/nothere; No such file or directory

The command returned an error.

lxplus$ echo $?
0

Cheers,
-- 
MS

########################################################################
Use REPLY-ALL to reply to list

To unsubscribe from the XROOTD-L list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=XROOTD-L&A=1