{
    "content": [
        {
            "type": "text",
            "text": "# gio (man)\n\n## NAME\n\ngio - GIO commandline tool\n\n## SYNOPSIS\n\ngio 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 MIMETYPE [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## DESCRIPTION\n\ngio 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\nlocations instead of local files: for example you can use something like\nsmb://server/resource/file.txt as a location.\n\n## TLDR\n\n> Handle local and virtual files (GVfs).\n\n- Open a file with the default application (e.g. PDF, image):\n  `gio open {{path/to/file}}`\n- List files in a directory:\n  `gio list {{path/to/directory}}`\n- Show information about a file:\n  `gio info {{path/to/file}}`\n- Copy a file:\n  `gio copy {{path/to/source}} {{path/to/destination}}`\n- Send a file to the trash (reversible):\n  `gio trash {{path/to/file}}`\n- Empty the trash:\n  `gio trash --empty`\n- Launch an application from a `.desktop` file:\n  `gio launch {{path/to/file}}.desktop`\n- Mark a `.desktop` file as trusted, allowing it to be executed:\n  `gio set {{path/to/file}}.desktop metadata::trusted true`\n\n*Source: tldr-pages*\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **COMMANDS** (1 subsections)\n- **EXIT STATUS**\n- **SEE ALSO**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "gio",
        "section": "",
        "mode": "man",
        "summary": "gio - GIO commandline tool",
        "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 MIMETYPE [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...]",
        "tldr_summary": "Handle local and virtual files (GVfs).",
        "tldr_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"
            }
        ],
        "tldr_source": "official",
        "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"
            },
            {
                "name": "GIO",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/GIO/1/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 38,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 8,
                "subsections": []
            },
            {
                "name": "COMMANDS",
                "lines": 4,
                "subsections": [
                    {
                        "name": "version",
                        "lines": 340
                    }
                ]
            },
            {
                "name": "EXIT STATUS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 5,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "gio - GIO commandline tool\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "gio help [COMMAND]\n\ngio version\n\ngio cat LOCATION...\n\ngio copy [OPTION...] SOURCE... DESTINATION\n\ngio info [OPTION...] LOCATION...\n\ngio launch DESKTOP-FILE [FILE-ARG...]\n\ngio list [OPTION...] [LOCATION...]\n\ngio mime MIMETYPE [HANDLER]\n\ngio mkdir [OPTION...] LOCATION...\n\ngio monitor [OPTION...] [LOCATION...]\n\ngio mount [OPTION...] [LOCATION...]\n\ngio move [OPTION...] SOURCE... DESTINATION\n\ngio open LOCATION...\n\ngio rename LOCATION NAME\n\ngio remove [OPTION...] LOCATION...\n\ngio save [OPTION...] DESTINATION\n\ngio set [OPTION...] LOCATION ATTRIBUTE VALUE...\n\ngio trash [OPTION...] [LOCATION...]\n\ngio tree [OPTION...] [LOCATION...]\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\nlocations instead of local files: for example you can use something like\nsmb://server/resource/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\nspecific 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\nNote: 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\nspecified, the destination must be a directory.\n\nThe copy command is similar to the traditional cp utility.\n\nOptions\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,\nrather than 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-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\nnamespace, e.g.  unix, or by *, which matches all attributes. Several attributes\nor groups of attributes can be specified, separated by comma.\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-a --attributes=ATTRIBUTES\nThe attributes to get.\n\nAttributes can be specified with their GIO name, e.g.  standard::icon, or just by\nnamespace, e.g.  unix, or by *, which matches all attributes. Several attributes\nor groups of attributes can be specified, separated by comma.\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 MIMETYPE [HANDLER]\nIf no handler is given, the mime command lists the registered and recommended\napplications for the mimetype. If a handler is given, it is set as the default handler\nfor the mimetype.\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-p, --parent\nCreate parent directories when necessary.\n\nmonitor [OPTION...] [LOCATION...]\nMonitors files or directories for changes, such as creation deletion, content and\nattribute 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\nimplementations for different platforms. The most common implementation on Linux uses\ninotify.\n\nOptions\n-d, --dir=LOCATION\nMonitor the given location as a directory. Normally, the file type is used to\ndetermine whether to monitor a file or directory.\n\n-f, --file=LOCATION\nMonitor the given location as a file. Normally, the file type is used to\ndetermine whether to monitor a file or 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,\npasswords, and so on, when required.\n\nOptions\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-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 mimetype.\n\nEnvironment variables will not be set on the application, as it may be an existing\nprocess which 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,\nsee the 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-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-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 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,\nmultiple values can be given.\n\nOptions\n-t, --type=TYPE\nSpecifies the type of the attribute. Supported types are string, stringv,\nbytestring, boolean, uint32, int32, uint64, int64 and unset.\n\nIf the type is not specified, string is assumed.\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\nsupport this concept. In the common case that the file lives inside a user’s home\ndirectory, the 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\nremove 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\ngio list trash://.\n\nOptions\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://\nis expected 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\nlocation is given, it defaults to the current directory.\n\nThe tree command is similar to the traditional tree utility.\n\nOptions\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\n\nGIO                                                                                           GIO(1)",
                "subsections": []
            }
        }
    }
}