LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

gio

GNOME file operations utility supporting local and virtual filesystems

TLDR

Open a file with its default application
$ gio open [path/to/file]
copy
List a directory, including virtual locations
$ gio list [smb://server/share]
copy
Show a file's attributes
$ gio info [path/to/file]
copy
Show a specific group of attributes
$ gio info --attributes=[standard::*] [path/to/file]
copy
Print a remote file to standard output
$ gio cat [sftp://host/path/to/file]
copy
Copy across backends, from local disk to a remote share
$ gio copy [path/to/local] [sftp://host/path/]
copy
Move a file
$ gio move [path/to/source] [path/to/destination]
copy
Send a file to the trash
$ gio trash [path/to/file]
copy
Delete everything in the trash
$ gio trash --empty
copy
Delete a file permanently
$ gio remove [path/to/file]
copy
Show the tree below a location
$ gio tree [path/to/directory]
copy
Mount a remote share through GVfs
$ gio mount [smb://server/share]
copy
Unmount it again
$ gio mount --unmount [smb://server/share]
copy
Watch a directory and print changes as they happen
$ gio monitor [path/to/directory]
copy
Mark a launcher trusted so it can be run
$ gio set [path/to/file.desktop] metadata::trusted true
copy

SYNOPSIS

gio command [arguments]

DESCRIPTION

gio is the GIO command-line tool for file operations in GNOME-based systems. It provides a unified interface for both local files and virtual filesystems (GVfs), including network locations, trash, and removable media.Unlike standard Unix commands, gio integrates with GNOME's infrastructure, respecting desktop settings for default applications, trash behavior, and virtual filesystem mounts. It can access locations like smb://, sftp://, mtp://, and trash://.

PARAMETERS

open FILE

Open file with default application
list DIR
List contents of directory
info FILE
Display information about a file
copy SRC DEST
Copy files
move SRC DEST
Move files
trash FILE
Move file to trash
remove FILE
Delete file permanently
cat FILE
Display file contents
launch DESKTOP
Launch application from .desktop file
mime FILE
Get or set MIME type handler
mount LOCATION
Mount a location

INSTALL

sudo apt install libglib2.0-bin
copy
sudo dnf install glib
copy
sudo apk add glib
copy
brew install glib
copy
nix profile install nixpkgs#glib
copy

CAVEATS

Requires GLib and GVfs to be properly installed. Some virtual filesystem operations require the gvfsd daemon running. Performance may be slower than native commands for local file operations.

HISTORY

gio was introduced in GLib 2.50 (2016) as a unified command-line interface for GIO operations, consolidating various gvfs-* utilities into a single tool with subcommands.

SEE ALSO

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid