2025-07-24 22:27:13 -06:00
|
|
|
# gio
|
|
|
|
|
|
|
|
|
|
> Handle local and virtual files (GVfs).
|
|
|
|
|
> Part of GLib used in GNOME-based systems.
|
|
|
|
|
> More information: <https://manned.org/gio>.
|
|
|
|
|
|
|
|
|
|
- Open a file with the default application (e.g. PDF, image):
|
|
|
|
|
|
|
|
|
|
`gio open {{path/to/file}}`
|
|
|
|
|
|
|
|
|
|
- List files in a directory:
|
|
|
|
|
|
|
|
|
|
`gio list {{path/to/directory}}`
|
|
|
|
|
|
|
|
|
|
- Show information about a file:
|
|
|
|
|
|
|
|
|
|
`gio info {{path/to/file}}`
|
|
|
|
|
|
|
|
|
|
- Copy a file:
|
|
|
|
|
|
|
|
|
|
`gio copy {{path/to/source}} {{path/to/destination}}`
|
|
|
|
|
|
|
|
|
|
- Send a file to the trash (reversible):
|
|
|
|
|
|
|
|
|
|
`gio trash {{path/to/file}}`
|
2026-02-18 06:55:01 -07:00
|
|
|
|
|
|
|
|
- Empty the trash:
|
|
|
|
|
|
|
|
|
|
`gio trash --empty`
|
|
|
|
|
|
|
|
|
|
- Launch an application from a `.desktop` file:
|
|
|
|
|
|
|
|
|
|
`gio launch {{path/to/file}}.desktop`
|
|
|
|
|
|
|
|
|
|
- Mark a `.desktop` file as trusted, allowing it to be executed:
|
|
|
|
|
|
|
|
|
|
`gio set {{path/to/file}}.desktop metadata::trusted true`
|