Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Xrootd does not provide the directory listing (ls) semantics as a file system does.
The xrdls is a command line tool that looks a little bit like an ls. By defaults it
loops over all xrootd data servers and obtains a directory listing for each of them.

Code Blockpanel
titleusage

Wiki Markup

xrdls \[-l\] \[dataserver\] directory

*

  • -l
  • prints
  • a
  • long
  • listing
*
  • specify
  • dataserver
  • if
  • the
  • listing
  • from
  • only
  • this
  • server
  • is
  • requested.
  • Default
  • is
  • to

  • loop
  • over
  • all
  • servers

It is implemented by using the standard unix ls command together with the
xrootd preload library. Using the long listing the user and group name are
not meaningful. The time shown is the mtime.

Below are some examples

Code Blockpanel
titlesimple ls

>

xrdls

/glast/mc

==listing

from

server

sulky02


ServiceChallenge

TonyTest

junk


==listing

from

server

sulky47


DC2

ServiceChallenge

junk


==listing

from

server

sulky48


DC2

ServiceChallenge

TonyTest

junk

Code Blocknoformat
titlels using long format
>xrdls -l /glast/mc

==listing from server sulky02
total 4
drwx------    1 wilko    ec           1536 Aug  2 15:38 ServiceChallenge
drwx------    1 wilko    ec            512 Jun 17 13:39 TonyTest
drwx------    1 wilko    ec            512 May 15 16:36 junk
==listing from server sulky47
total 3
drwx------    1 wilko    ec            512 Jan  8  2007 DC2
drwx------    1 wilko    ec            512 May  3 09:54 ServiceChallenge
drwx------    1 wilko    ec            512 Feb 28 09:13 junk
==listing from server sulky48
total 5
drwx------    1 wilko    ec            512 Jan  8  2007 DC2
drwx------    1 wilko    ec           1536 Jul 27 17:28 ServiceChallenge
drwx------    1 wilko    ec            512 Jun 17 13:39 TonyTest
drwx------    1 wilko    ec            512 May 16 18:15 junk
Code Blocknoformat
titlels for single server
> xrdls -l sulky02  /glast/wilko

==listing from server sulky02
ls: root://sulky02//glast/wilko/n2.root: No such file or directory
total 1027
-rw-------    1 wilko    ec              0 Aug  9 23:36 DIR_LOCK
-rw-------    1 wilko    ec          10240 Aug  9 23:35 n1.root
-rw-------    1 wilko    ec              0 Aug  9 23:34 n1.root.lock
-rw-------    1 wilko    ec              0 Aug  9 23:35 n2.root.lock
-rw-------    1 wilko    ec        1037312 Aug  9 23:36 new.root
-rw-------    1 wilko    ec              0 Aug  9 23:35 new.root.lock
drwx------    1 wilko    ec            512 Aug  2 10:23 test

...

  1. The line
    ls: root://sulky02//glast/wilko/n2.root: No such file or directory
    means that there is a link in the directory and the link target (which is the file
    in the cache) is missing and therefore the stat of the file fails (like ls -lL would do).
  2. There is one special file DIR_LOCK and files with the extensions .lock. These files
    used by the xrootd to manage a the cache file system and keep track if files have been
    migrated to HPSS. These files must not be used or removed.