xrdfs(1)

🌸 xrdfs β€” the manual page, bestie edition πŸ’…

okay so picture this: it's xrdfs(1), it lives in the General Commands Manual, and it is literally your go-to girl for xrootd file and directory meta-data. let's get into it 🫢


✨ NAME ✨

xrdfs β€” xrootd file and directory meta-data utility 🌈


✨ SYNOPSIS ✨


xrdfs [global-options] host[:port] [command [args]]

xrdfs [global-options] command [args containing complete URLs]

command: help, cache, chmod, ls, locate, mkdir, mv, stat, statvfs, query,
           rm, rmdir, truncate, prepare, cat, tail, spaceinfo, xattr

two whole forms, bestie. pick your lane πŸ‘‘


✨ DESCRIPTION ✨

so xrdfs runs meta-data oriented operations (think ls, mv, rm, etc.) on one or more xrootd servers. the way it works:

  • in batch mode, the endpoint can either be handed to you separately, before the command, or it gets inferred from complete URL path operands that come after the command.
  • global options have to come first β€” before the endpoint or the command. no cutting the line πŸ™…
  • the server-first form and the command-first form are alternatives. you may not mix them. it's giving choose one, periodt.
  • all complete URLs in one command gotta use the same scheme, user information, host, and effective port. and yes β€” an omitted default port compares equal to that same port written out explicitly. equality slay ✨
  • query stays server-first forever and always, because its implementation-dependent parameters might literally look like URLs themselves. it's not being difficult, it's just like that πŸ’€
  • local file:// and stdio:// operands are not remote endpoints and get straight up rejected in command-first form. not remote, not welcome 🚫
  • want command help? invoke xrdfs with no command line options or parameters, wait for the input prompt, then type "help". iconic behaviour honestly πŸŽ€

✨ OPTIONS ✨

  • -4, --ipv4 β€” use only the IPv4 network stack and addresses. old school but make it work πŸ’œ
  • -6, --ipv6 β€” use only the IPv6 network stack and addresses. future forward bestie 🌐
  • -d, --debug level β€” set the debug level: 0 off, 1 low, 2 medium, or 3 high. 0 to 3, a whole mood scale πŸ”₯
  • -h, --help β€” display help and exit. the classic. the icon. πŸ™ˆ
  • --no-cwd β€” do not preset a CWD in interactive mode. if you don't want a cwd, you simply don't get one πŸ’…

✨ EXAMPLES ✨

these server-first and command-first invocations are equivalent, no cap:


Server-first                    Command-first
xrdfs host stat /path           xrdfs stat root://host//path
xrdfs host ls /dir              xrdfs ls root://host//dir
xrdfs host mv /old /new         xrdfs mv root://host//old root://host//new

and real quick, a lil URL lore for you 🧚 β€” in an XRootD URL, the double slash after the host is actually two things holding hands: the slash separating the authority from the path, plus the leading slash of the absolute path. a single slash is also accepted, and it gets normalized to an absolute command path. so it's flexible. we love a flexible queen πŸ’–


✨ COMMANDS ✨

chmod path <user><group><other>

modify permissions of the path. permission string example: rwxr-x--x πŸ”

ls [-l] [-u] [-R] [-D] [-Z] [-C] [dirname]

get directory listing. the flags, bestie:

  • -l stat every entry and print long listing
  • -u print paths as URLs
  • -R list subdirectories recursively
  • -D show duplicate entries
  • -Z check if file is a ZIP archive and if yes list its content
  • -C checksum every entry

locate [-n] [-r] [-d] [-m] [-i] [-p] <path>

get the locations of the path. flags:

  • -r refresh, don't use cached locations
  • -n make the server return the response immediately even though it may be incomplete
  • -d do a recursive, deep locate in order to find data servers
  • -m prefer host names to IP addresses
  • -i ignore network dependencies (IPv6/IPv4)
  • -p be passive: ignore tried/triedrc cgi opaque info

mkdir [-p] [-m<user><group><other>] <dirname>

creates a directory / tree of directories 🌳

  • -p create the entire directory tree recursively
  • -m<user><group><other> permissions for newly created directories

mv <path1> <path2>

move path1 to path2 locally on the same server. local moves only, we're not shipping anything across servers πŸ’«

stat <path> [<paths>]

get info about the file(s) or directory(ies).

  • -q <flags> makes xrdfs return error code 55 to the shell if the requested flag combination is not present; flags may be combined together using '|' or '&'
  • available flags: XBitSet, IsDir, Other, Offline, POSCPending, IsReadable, IsWriteable, BackUpExists

statvfs <path>

get info about a virtual file system πŸ’Ύ

query <code> <params>

obtain server information. query codes:

  • config <what> β€” server configuration; <what> is one of the following:
    • bind_max β€” the maximum number of parallel streams
    • chksum β€” the supported checksum
    • pio_max β€” maximum number of parallel I/O requests
    • readv_ior_max β€” maximum size of a readv element
    • readv_iov_max β€” maximum number of readv entries
    • tpc β€” support for third party copies
    • wan_port β€” the port to use for wan copies
    • wan_window β€” the wan_port window size
    • window β€” the tcp window size
    • cms β€” the status of the cmsd
    • role β€” the role in a cluster
    • sitename β€” the site name
    • version β€” the version of the server
  • checksumcancel <path> β€” file checksum cancellation
  • checksum <path> β€” file checksum
  • opaque <arg> β€” implementation dependent
  • opaquefile <arg> β€” implementation dependent
  • space <space> β€” logical space stats
  • stats <what> β€” server stats; <what> is a list of letters indicating information to be returned:
    • a β€” all statistics
    • p β€” protocol statistics
    • b β€” buffer usage statistics
    • s β€” scheduling statistics
    • d β€” device polling statistics
    • u β€” usage statistics
    • i β€” server identification
    • z β€” synchronized statistics
    • l β€” connection statistics
  • xattr <path> β€” extended attributes
  • prepare <reqid> [filenames] β€” prepare request status

rm <filename> [<filenames>]

remove a file πŸ—‘οΈ

rmdir <dirname>

remove a directory πŸ“

truncate <filename> <length>

truncate a file βœ‚οΈ

prepare [-c] [-f] [-s] [-w] [-e] [-p priority] [-a requestid] filenames

prepare one or more files for access.

  • -c co-locate staged files if possible
  • -f refresh file access time even if the location is known
  • -s stage the files to disk if they are not online
  • -w when files will be accessed for modification
  • -p priority β€” priority of the request, 0 (lowest) – 3 (highest)
  • -a requestid β€” abort the request
  • -e evict the file from disk cache

cat [-o localfile] files

print contents of one or more files to stdout 🐱

  • -o localfile β€” print to the specified local file

tail [-c bytes] [-f] file

output last part of files to stdout.

  • -c num_bytes β€” out last num_bytes
  • -f β€” output appended data as file grows

spaceinfo path

get space statistics for given path πŸ“Š

xattr <path> <code> <params>

operation on extended attributes. codes:

  • set <attr> β€” set extended attribute; <attr> is string of form name=value
  • get <name> β€” get extended attribute.
  • del <name> β€” delete extended attribute.
  • list β€” list extended attributes.

✨ RETURN CODES ✨

  • 50 : generic error (e.g. config, internal, data, OS) 😭
  • 51 : socket related error
  • 52 : postmaster related error
  • 53 : XRootD related error
  • 54 : redirection error
  • 55 : query response was negative (this is not an error) β€” not an error bestie, breathe 🫢

✨ NOTES ✨

for the list of available environment variables, please refer to xrdcopy(1) πŸ“š


✨ DIAGNOSTICS ✨

errors yield an error message and a non-zero exit status. she tells you when something's wrong πŸ’€


✨ LICENSE ✨

LGPL πŸ“œ


✨ SUPPORT LEVEL ✨

the xrdfs command is supported by the XRootD Collaboration. contact information can be found at

https://xrootd.org/contact.html

and that's the whole page, bestie πŸ’– this is version v6.2.0 energy β€” go forth, ls, mv, rm responsibly, and remember: server-first or command-first, never both. mwah πŸ’…πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from