gio
Plain filenames which contain a colon will be interpreted as URIs with an unknown protocol. To avoid this, prefix them with a path such as ./, or with the file: protocol.
help [COMMAND]
version
cat LOCATION...
The cat command works just like the traditional cat utility.
Note: just pipe through cat if you need its formatting options like -n, -T or other.
copy [OPTION...] SOURCE... DESTINATION
The copy command is similar to the traditional cp utility.
-T, --no-target-directory
-p, --progress
-i, --interactive
--preserve
-b, --backup
-P, --no-dereference
--default-permissions
Options
info [OPTION...] LOCATION...
The info command is similar to the traditional ls utility.
-w, --query-writable
-f, --filesystem
-a --attributes=ATTRIBUTES
Attributes can be specified with their GIO name, e.g.
standard::icon, or just by namespace, e.g.
unix, or by
*, which matches all attributes. Several attributes or groups of attributes can be specified, separated by comma.
By default, all attributes are listed.
-n, --nofollow-symlinks
Options
launch DESKTOP-FILE [FILE-ARG...]
The launch command extends the behavior of the open command by allowing any desktop file to be launched, not only those registered as file handlers.
list [OPTION...] [LOCATION...]
The list command is similar to the traditional ls utility.
-a --attributes=ATTRIBUTES
Attributes can be specified with their GIO name, e.g.
standard::icon, or just by namespace, e.g.
unix, or by
*, which matches all attributes. Several attributes or groups of attributes can be specified, separated by comma.
By default, all attributes are listed.
-h, --hidden
-l, --long
-n, --nofollow-symlinks
-d, --print-display-names
-u, --print-uris
Options
mime MIMETYPE [HANDLER]
Handlers must be specified by their desktop file name, including the extension. Example: org.gnome.gedit.desktop.
mkdir [OPTION...] LOCATION...
The mkdir command is similar to the traditional mkdir utility.
-p, --parent
Options
monitor [OPTION...] [LOCATION...]
The monitor command uses the GIO file monitoring APIs to do its job. GIO has different implementations for different platforms. The most common implementation on Linux uses inotify.
-d, --dir=LOCATION
-f, --file=LOCATION
-D, --direct=LOCATION
-s, --silent=LOCATION
-n, --no-moves
-m, --mounts
Options
mount [OPTION...] [LOCATION...]
Mounting refers to the traditional concept of arranging multiple file systems and devices in a single tree, rooted at /. Classical mounting happens in the kernel and is controlled by the mount utility. GIO expands this concept by introducing mount daemons that can make file systems available to GIO applications without kernel involvement.
GIO mounts can require authentication, and the mount command may ask for user IDs, passwords, and so on, when required.
-m, --mountable
-d, --device=ID
-u, --unmount
-e, --eject
-t, --stop=DEVICE
-s, --unmount-scheme=SCHEME
-f, --force
-a, --anonymous
-l, --list
-o, --monitor
-i, --detail
--tcrypt-pim
--tcrypt-hidden
--tcrypt-system
Options
move [OPTION...] SOURCE... DESTINATION
The move command is similar to the traditional mv utility.
-T, --no-target-directory
-p, --progress
-i, --interactive
-b, --backup
-C, --no-copy-fallback
Options
open LOCATION...
GIO obtains this information from the shared-mime-info database, with per-user overrides stored in $XDG_DATA_HOME/applications/mimeapps.list.
The mime command can be used to change the default handler for a mimetype.
Environment variables will not be set on the application, as it may be an existing process which is activated to handle the new file.
rename LOCATION NAME
The rename command is similar to the traditional rename utility.
remove [OPTION...] LOCATION...
This command removes files irreversibly. If you want a reversible way to remove files, see the trash command.
Note that not all URI schemes that are supported by GIO may allow deletion of files.
The remove command is similar to the traditional rm utility.
-f, --force
Options
save [OPTION...] DESTINATION
This is similar to just redirecting output to a file using traditional shell syntax, but the save command allows saving to location that GIO can write to.
-b, --backup
-c, --create
-a, --append
-p, --private
-u, --unlink
-v, --print-etag
-e, --etag=ETAG
Options
set LOCATION ATTRIBUTE VALUE...
File attributes can be specified with their GIO name, e.g standard::icon. Note that not all GIO file attributes are writable. Use the --query-writable option of the info command to list writable file attributes.
If the TYPE is unset, VALUE does not have to be specified. If the TYPE is stringv, multiple values can be given.
Options
-t, --type=TYPE
If the type is not specified, string is assumed.
-n, --nofollow-symlinks
trash [OPTION...] [LOCATION...]
Note that moving files to the trash does not free up space on the file system until the 'Trashcan' is emptied. If you are interested in deleting a file irreversibly, see the remove command.
Inspecting and emptying the 'Trashcan' is normally supported by graphical file managers such as Nautilus, but you can also see the trash with the command: gio trash --list or gio list trash://.
Options
-f, --force
--empty
--list
--restore
tree [OPTION...] [LOCATION...]
The tree command is similar to the traditional tree utility.
Options
-h, --hidden
-l, --follow-symlinks
On success 0 is returned, a non-zero failure code otherwise.
cat(1), cp(1), ls(1), mkdir(1), mv(1), rm(1), tree(1).