xfs_io
commands may be run interactively (the default) or as
arguments on the command line. Interactive mode always runs
commands on the current open file, whilst commands run from the
command line may be repeated on all open files rather than just
the current open file. In general, open file iteration will
occur for commands that operate on file content or state. In
contrast, commands that operate on filesystem or system-wide
state will only be run on the current file regardless of how many
files are currently open. Multiple arguments may be given on the
command line and they are run in the sequence given. The program
exits one all commands have been run.
-c
cmd Run the specified command on all currently open files. To
maintain compatibility with historical usage, commands
that can not be run on all open files will still be run
but only execute once on the current open file. Multiple
-c
arguments may be given and may be interleaved on the
command line in any order with -C
commands.
-C
cmd Run the specified command only on the current open file.
Multiple -C
arguments may be given and may be interleaved
on the command line in any order with -c
commands.
-p
prog
Set the program name for prompts and some error messages,
the default value is xfs_io
.
-f
Create file if it does not already exist.
-r
Open file read-only, initially. This is required if file
is immutable or append-only.
-i
Start an idle thread. The purpose of this idle thread is
to test io from a multi threaded process. With single
threaded process, the file table is not shared and file
structs are not reference counted. Spawning an idle
thread can help detecting file struct reference leaks.
-x
Expert mode. Dangerous commands are only available in this
mode. These commands also tend to require additional
privileges.
-V
Prints the version number and exits.
The other open(2) options described below are also available from
the command line.