xrdfs - Man Page
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, xattrDescription
The xrdfs utility executes meta-data oriented operations (e.g., ls, mv, rm, etc.) on one or more xrootd servers. In batch mode, the endpoint may either be provided separately before the command or inferred from complete URL path operands following the command. Global options must precede the endpoint or command. The server-first and command-first forms are alternatives and may not be mixed. All complete URLs in one command must use the same scheme, user information, host, and effective port; an omitted default port compares equal to the same port specified explicitly. The query command remains server-first because its implementation-dependent parameters may themselves look like URLs. Local file:// and stdio:// operands are not remote endpoints and are rejected in command-first form. Command help is available by invoking xrdfs with no command line options or parameters and then typing "help" in response to the input prompt.
Options
- -4, --ipv4
Use only the IPv4 network stack and addresses.
- -6, --ipv6
Use only the IPv6 network stack and addresses.
- -d, --debug level
Set the debug level: 0 off, 1 low, 2 medium, or 3 high.
- -h, --help
Display help and exit.
- --no-cwd
Do not preset a CWD in interactive mode.
Examples
The following server-first and command-first invocations are equivalent:
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
In an XRootD URL, the double slash after the host consists of the slash separating the authority from the path and the leading slash of the absolute path. A single slash is also accepted and normalized to an absolute command path.
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.
-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.
-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.
- 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 serverchecksumcancel <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 statisticsxattr <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 of the request, 0 (lowest) - 3 (highest)
-a abort the request
-e evict the file from disk cache- cat [-o localfile] files
Print contents of one or mote files to stdout
-o 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)
Notes
For the list of available environment variables please refere to xrdcopy(1)
Diagnostics
Errors yield an error message and a non-zero exit status.
License
LGPL
Support Level
The xrdfs command is supported by the XRootD Collaboration. Contact information can be found at