{
    "mode": "man",
    "parameter": "GIO",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/GIO/1/json",
    "generated": "2026-10-22T13:12:56Z",
    "synopsis": "gio help [COMMAND]\ngio version\ngio cat LOCATION…\ngio copy [OPTION…] SOURCE… DESTINATION\ngio info [OPTION…] LOCATION…\ngio launch DESKTOP-FILE [FILE-ARG…]\ngio list [OPTION…] [LOCATION…]\ngio mime MIME-TYPE [HANDLER]\ngio mkdir [OPTION…] LOCATION…\ngio monitor [OPTION…] [LOCATION…]\ngio mount [OPTION…] [LOCATION…]\ngio move [OPTION…] SOURCE… DESTINATION\ngio open LOCATION…\ngio rename LOCATION NAME\ngio remove [OPTION…] LOCATION…\ngio save [OPTION…] DESTINATION\ngio set [OPTION…] LOCATION ATTRIBUTE VALUE…\ngio trash [OPTION…] [LOCATION…]\ngio tree [OPTION…] [LOCATION…]",
    "sections": {
        "NAME": {
            "content": "gio - GIO commandline tool\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "gio help [COMMAND]\ngio version\ngio cat LOCATION…\ngio copy [OPTION…] SOURCE… DESTINATION\ngio info [OPTION…] LOCATION…\ngio launch DESKTOP-FILE [FILE-ARG…]\ngio list [OPTION…] [LOCATION…]\ngio mime MIME-TYPE [HANDLER]\ngio mkdir [OPTION…] LOCATION…\ngio monitor [OPTION…] [LOCATION…]\ngio mount [OPTION…] [LOCATION…]\ngio move [OPTION…] SOURCE… DESTINATION\ngio open LOCATION…\ngio rename LOCATION NAME\ngio remove [OPTION…] LOCATION…\ngio save [OPTION…] DESTINATION\ngio set [OPTION…] LOCATION ATTRIBUTE VALUE…\ngio trash [OPTION…] [LOCATION…]\ngio tree [OPTION…] [LOCATION…]\n\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "gio is a utility that makes many of the GIO features available from the commandline. In doing\nso, it provides commands that are similar to traditional utilities, but let you use GIO loca‐\ntions  instead  of  local  files:  for  example  you  can use something like smb://server/re‐\nsource/file.txt as a location.\n\nPlain filenames which contain a colon will be interpreted as URIs with an  unknown  protocol.\nTo avoid this, prefix them with a path such as ./, or with the file: protocol.\n",
            "subsections": []
        },
        "COMMANDS": {
            "content": "help COMMAND\nDisplays  a  short  synopsis of the available commands or provides detailed help on a spe‐\ncific command.\n",
            "subsections": [
                {
                    "name": "version",
                    "content": "Prints the GLib version to which gio belongs.\n\ncat LOCATION…\nConcatenates the given files and prints them to the standard output.\n\nThe cat command works just like the traditional cat utility.\n\nMote: just pipe through cat if you need its formatting options like -n, -T or other.\n\ncopy [OPTION…] SOURCE… DESTINATION\nCopies one or more files from SOURCE to DESTINATION. If more than one source is specified,\nthe destination must be a directory.\n\nThe copy command is similar to the traditional cp utility.\n\nOptions\n\n-T, --no-target-directory\nDon’t copy into DESTINATION even if it is a directory.\n\n-p, --progress\nShow progress.\n\n-i, --interactive\nPrompt for confirmation before overwriting files.\n\n--preserve\nPreserve all attributes of copied files.\n\n-b, --backup\nCreate backups of existing destination files.\n\n-P, --no-dereference\nNever follow symbolic links.\n\n--default-permissions\nUse the default permissions of the current process for the  destination  file,  rather\nthan copying the permissions of the source file.\n\ninfo [OPTION…] LOCATION…\nShows information about the given locations.\n\nThe info command is similar to the traditional ls utility.\n\nOptions\n\n-w, --query-writable\nList writable attributes.\n\n-f, --filesystem\nShow information about the filesystem that the given locations reside on.\n\n-a, --attributes=<ATTRIBUTES>\nThe attributes to get.\n\nAttributes can be specified with their GIO name, e.g. standard::icon, or just by name‐\nspace,  e.g. unix, or by *, which matches all attributes. Several attributes or groups\nof attributes can be specified, separated by commas.\n\nBy default, all attributes are listed.\n\n-n, --nofollow-symlinks\nDon’t follow symbolic links.\n\nlaunch DESKTOP-FILE [FILE-ARG…]\nLaunch a desktop file from any location given.\n\nThe launch command extends the behavior of the open command by allowing any  desktop  file\nto be launched, not only those registered as file handlers.\n\nlist [OPTION…] [LOCATION…]\nLists  the  contents  of the given locations. If no location is given, the contents of the\ncurrent directory are shown.\n\nThe list command is similar to the traditional ls utility.\n\nOptions\n\n-a, --attributes=<ATTRIBUTES>\nThe attributes to get.\n\nAttributes can be specified with their GIO name, e.g. standard::icon, or just by name‐\nspace, e.g. unix, or by *, which matches all attributes.  Several attributes or groups\nof attributes can be specified, separated by commas.\n\nBy default, all attributes are listed.\n\n-h, --hidden\nShow hidden files.\n\n-l, --long\nUse a long listing format.\n\n-n, --nofollow-symlinks\nDon’t follow symbolic links.\n\n-d, --print-display-names\nPrint display names.\n\n-u, --print-uris\nPrint full URIs.\n\nmime MIME-TYPE [HANDLER]\nIf no handler is given, the mime command lists the registered and recommended applications\nfor the MIME type. If a handler is given, it is set as the default handler  for  the  MIME\ntype.\n\nHandlers  must  be specified by their desktop file name, including the extension. Example:\norg.gnome.gedit.desktop.\n\nmkdir [OPTION…] LOCATION…\nCreates directories.\n\nThe mkdir command is similar to the traditional mkdir utility.\n\nOptions\n\n-p, --parent\nCreate parent directories when necessary.\n\nmonitor [OPTION…] [LOCATION…]\nMonitors files or directories for changes, such as  creation  deletion,  content  and  at‐\ntribute changes, and mount and unmount operations affecting the monitored locations.\n\nThe monitor command uses the GIO file monitoring APIs to do its job. GIO has different im‐\nplementations  for  different platforms. The most common implementation on Linux uses ino‐\ntify.\n\nOptions\n\n-d, --dir=<LOCATION>\nMonitor the given location as a directory. Normally, the file type is used  to  deter‐\nmine whether to monitor as a file or as a directory.\n\n-f, --file=<LOCATION>\nMonitor  the  given  location  as a file. Normally, the file type is used to determine\nwhether to monitor as a file or as a directory.\n\n-D, --direct=<LOCATION>\nMonitor the file directly. This allows changes made via hardlinks to be captured.\n\n-s, --silent=<LOCATION>\nMonitor the file directly, but don’t report changes.\n\n-n, --no-moves\nReport moves and renames as simple deleted/created events.\n\n-m, --mounts\nWatch for mount events.\n\nmount [OPTION…] [LOCATION…]\nProvides commandline access to various aspects of GIO’s mounting functionality.\n\nMounting refers to the traditional concept of arranging multiple file systems and  devices\nin  a single tree, rooted at /. Classical mounting happens in the kernel and is controlled\nby the mount utility. GIO expands this concept by introducing mount daemons that can  make\nfile systems available to GIO applications without kernel involvement.\n\nGIO  mounts  can require authentication, and the mount command may ask for user IDs, pass‐\nwords, and so on, when required.\n\nOptions\n\n-m, --mountable\nMount as mountable.\n\n-d, --device=<ID>\nMount volume with device file, or other identifier.\n\n-u, --unmount\nUnmount the location.\n\n-e, --eject\nEject the location.\n\n-t, --stop=<DEVICE>\nStop drive with device file.\n\n-s, --unmount-scheme=<SCHEME>\nUnmount all mounts with the given scheme.\n\n-f, --force\nIgnore outstanding file operations when unmounting or ejecting.\n\n-a, --anonymous\nUse an anonymous user when authenticating.\n\n-l, --list\nList all GIO mounts.\n\n-o, --monitor\nMonitor mount-related events.\n\n-i, --detail\nShow extra information.\n\n--tcrypt-pim\nThe numeric PIM when unlocking a VeraCrypt volume.\n\n--tcrypt-hidden\nMount a TCRYPT hidden volume.\n\n--tcrypt-system\nMount a TCRYPT system volume.\n\nmove [OPTION…] SOURCE… DESTINATION\nMoves one or more files from SOURCE to DESTINATION. If more than one source is  specified,\nthe destination must be a directory.\n\nThe move command is similar to the traditional mv utility.\n\nOptions\n\n-T, --no-target-directory\nDon’t copy into DESTINATION even if it is a directory.\n\n-p, --progress\nShow progress.\n\n-i, --interactive\nPrompt for confirmation before overwriting files.\n\n-b, --backup\nCreate backups of existing destination files.\n\n-C, --no-copy-fallback\nDon’t use copy and delete fallback.\n\nopen LOCATION…\nOpens files with the default application that is registered to handle files of this type.\n\nGIO  obtains  this information from the shared-mime-info database, with per-user overrides\nstored in $XDGDATAHOME/applications/mimeapps.list.\n\nThe mime command can be used to change the default handler for a MIME type.\n\nEnvironment variables will not be set on the application, as it may be an existing process\nwhich is activated to handle the new file.\n\nrename LOCATION NAME\nRenames a file.\n\nThe rename command is similar to the traditional rename utility.\n\nremove [OPTION…] LOCATION…\nDeletes each given file.\n\nThis command removes files irreversibly. If you want a reversible way to remove files, see\nthe trash command.\n\nNote that not all URI schemes that are supported by GIO may allow deletion of files.\n\nThe remove command is similar to the traditional rm utility.\n\nOptions\n\n-f, --force\nIgnore non-existent and non-deletable files.\n\nsave [OPTION…] DESTINATION\nReads from standard input and saves the data to the given location.\n\nThis is similar to just redirecting output to a file using traditional shell  syntax,  but\nthe save command allows saving to location that GIO can write to.\n\nOptions\n\n-b, --backup\nBack up existing destination files.\n\n-c, --create\nOnly create the destination if it doesn’t exist yet.\n\n-a, --append\nAppend to the end of the file.\n\n-p, --private\nWhen creating, restrict access to the current user.\n\n-u, --unlink\nWhen replacing, replace as if the destination did not exist.\n\n-v, --print-etag\nPrint the new ETag in the end.\n\n-e, --etag=<ETAG>\nThe ETag of the file that is overwritten.\n\nset [OPTION…] LOCATION ATTRIBUTE VALUE…\nSets a file attribute on a file.\n\nFile  attributes  can be specified with their GIO name, e.g standard::icon.  Note that not\nall GIO file attributes are writable. Use the --query-writable option of the info  command\nto list writable file attributes.\n\nIf  the TYPE is unset, VALUE does not have to be specified. If the TYPE is stringv, multi‐\nple values can be given.\n\nOptions\n\n-t, --type=<TYPE>\nSpecifies the type of the attribute. Supported types are string, stringv,  bytestring,\nboolean, uint32, int32, uint64, int64 and unset.\n\nIf the type is not specified, string is assumed.\n\n-d, --delete\nUnsets an attribute (same as setting its type to unset).\n\n-n, --nofollow-symlinks\nDon’t follow symbolic links.\n\ntrash [OPTION…] [LOCATION…]\nSends files or directories to the ‘Trashcan’ or restore them from ‘Trashcan’.  This can be\na  different  folder depending on where the file is located, and not all file systems sup‐\nport this concept. In the common case that the file lives inside a user’s home  directory,\nthe trash folder is $XDGDATAHOME/Trash.\n\nNote  that  moving  files to the trash does not free up space on the file system until the\n‘Trashcan’ is emptied. If you are interested in deleting a file irreversibly, see the  re‐\nmove command.\n\nInspecting  and  emptying  the ‘Trashcan’ is normally supported by graphical file managers\nsuch as Nautilus, but you can also see the trash with the command: gio trash --list or gio\nlist trash://.\n\nOptions\n\n-f, --force\nIgnore non-existent and non-deletable files.\n\n--empty\nEmpty the trash.\n\n--list\nList files in the trash with their original locations.\n\n--restore\nRestore a file from trash to its original location. A URI beginning with  trash://  is\nexpected here. If the original directory doesn’t exist, it will be recreated.\n\ntree [OPTION…] [LOCATION…]\nLists the contents of the given locations recursively, in a tree-like format.  If no loca‐\ntion is given, it defaults to the current directory.\n\nThe tree command is similar to the traditional tree utility.\n\nOptions\n\n-h, --hidden\nShow hidden files.\n\n-l, --follow-symlinks\nFollow symbolic links.\n"
                }
            ]
        },
        "EXIT STATUS": {
            "content": "On success, 0 is returned, a non-zero failure code otherwise.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "cat(1), cp(1), ls(1), mkdir(1), mv(1), rm(1), tree(1)\n\n\nGIO()",
            "subsections": []
        }
    },
    "summary": "gio - GIO commandline tool",
    "flags": [],
    "examples": [],
    "see_also": [
        {
            "name": "cat",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/cat/1/json"
        },
        {
            "name": "cp",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/cp/1/json"
        },
        {
            "name": "ls",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/ls/1/json"
        },
        {
            "name": "mkdir",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/mkdir/1/json"
        },
        {
            "name": "mv",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/mv/1/json"
        },
        {
            "name": "rm",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/rm/1/json"
        },
        {
            "name": "tree",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/tree/1/json"
        }
    ],
    "tldr": {
        "source": "official",
        "description": "Handle local and virtual files (GVfs).",
        "examples": [
            {
                "description": "Open a file with the default application (e.g. PDF, image)",
                "command": "gio open {{path/to/file}}"
            },
            {
                "description": "List files in a directory",
                "command": "gio list {{path/to/directory}}"
            },
            {
                "description": "Show information about a file",
                "command": "gio info {{path/to/file}}"
            },
            {
                "description": "Copy a file",
                "command": "gio copy {{path/to/source}} {{path/to/destination}}"
            },
            {
                "description": "Send a file to the trash (reversible)",
                "command": "gio trash {{path/to/file}}"
            },
            {
                "description": "Empty the trash",
                "command": "gio trash --empty"
            },
            {
                "description": "Launch an application from a `.desktop` file",
                "command": "gio launch {{path/to/file}}.desktop"
            },
            {
                "description": "Mark a `.desktop` file as trusted, allowing it to be executed",
                "command": "gio set {{path/to/file}}.desktop metadata::trusted true"
            }
        ]
    }
}