1GIO(1)                           User Commands                          GIO(1)
2
3
4

NAME

6       gio - GIO commandline tool
7

SYNOPSIS

9       gio help [COMMAND]
10
11       gio version
12
13       gio cat LOCATION...
14
15       gio copy [OPTION...] SOURCE... DESTINATION
16
17       gio info [OPTION...] LOCATION...
18
19       gio list [OPTION...] [LOCATION...]
20
21       gio mime MIMETYPE [HANDLER]
22
23       gio mkdir [OPTION...] LOCATION...
24
25       gio monitor [OPTION...] [LOCATION...]
26
27       gio mount [OPTION...] [LOCATION...]
28
29       gio move [OPTION...] SOURCE... DESTINATION
30
31       gio open LOCATION...
32
33       gio rename LOCATION NAME
34
35       gio remove [OPTION...] LOCATION...
36
37       gio save [OPTION...] DESTINATION
38
39       gio set [OPTION...] LOCATION ATTRIBUTE VALUE...
40
41       gio trash [OPTION...] [LOCATION...]
42
43       gio tree [OPTION...] [LOCATION...]
44

DESCRIPTION

46       gio is a utility that makes many of the GIO features available from the
47       commandline. In doing so, it provides commands that are similar to
48       traditional utilities, but let you use GIO locations instead of local
49       files: for example you can use something like
50       smb://server/resource/file.txt as a location.
51
52       Plain filenames which contain a colon will be interpreted as URIs with
53       an unknown protocol. To avoid this, prefix them with a path such as ./,
54       or with the file: protocol.
55

COMMANDS

57       help [COMMAND]
58           Displays a short synopsis of the available commands or provides
59           detailed help on a specific command.
60
61       version
62           Prints the GLib version to which gio belongs.
63
64       cat LOCATION...
65           Concatenates the given files and prints them to the standard
66           output.
67
68           The cat command works just like the traditional cat utility.
69
70           Note: just pipe through cat if you need its formatting options like
71           -n, -T or other.
72
73       copy [OPTION...] SOURCE... DESTINATION
74           Copies one or more files from SOURCE to DESTINATION. If more than
75           one source is specified, the destination must be a directory.
76
77           The copy command is similar to the traditional cp utility.
78
79           Options
80               -T, --no-target-directory
81                   Don’t copy into DESTINATION even if it is a directory.
82
83               -p, --progress
84                   Show progress.
85
86               -i, --interactive
87                   Prompt for confirmation before overwriting files.
88
89               --preserve
90                   Preserve all attributes of copied files.
91
92               -b, --backup
93                   Create backups of existing destination files.
94
95               -P, --no-dereference
96                   Never follow symbolic links.
97
98               --default-permissions
99                   Use the default permissions of the current process for the
100                   destination file, rather than copying the permissions of
101                   the source file.
102
103       info [OPTION...] LOCATION...
104           Shows information about the given locations.
105
106           The info command is similar to the traditional ls utility.
107
108           Options
109               -w, --query-writable
110                   List writable attributes.
111
112               -f, --filesystem
113                   Show information about the filesystem that the given
114                   locations reside on.
115
116               -a --attributes=ATTRIBUTES
117                   The attributes to get.
118
119                   Attributes can be specified with their GIO name, e.g.
120                   standard::icon, or just by namespace, e.g.  unix, or by *,
121                   which matches all attributes. Several attributes or groups
122                   of attributes can be specified, separated by comma.
123
124                   By default, all attributes are listed.
125
126               -n, --nofollow-symlinks
127                   Don’t follow symbolic links.
128
129       list [OPTION...] [LOCATION...]
130           Lists the contents of the given locations. If no location is given,
131           the contents of the current directory are shown.
132
133           The list command is similar to the traditional ls utility.
134
135           Options
136               -a --attributes=ATTRIBUTES
137                   The attributes to get.
138
139                   Attributes can be specified with their GIO name, e.g.
140                   standard::icon, or just by namespace, e.g.  unix, or by *,
141                   which matches all attributes. Several attributes or groups
142                   of attributes can be specified, separated by comma.
143
144                   By default, all attributes are listed.
145
146               -h, --hidden
147                   Show hidden files.
148
149               -l, --long
150                   Use a long listing format.
151
152               -n, --nofollow-symlinks
153                   Don’t follow symbolic links.
154
155               -d, --print-display-names
156                   Print display names.
157
158               -u, --print-uris
159                   Print full URIs.
160
161       mime MIMETYPE [HANDLER]
162           If no handler is given, the mime command lists the registered and
163           recommended applications for the mimetype. If a handler is given,
164           it is set as the default handler for the mimetype.
165
166           Handlers must be specified by their desktop file name, including
167           the extension. Example: org.gnome.gedit.desktop.
168
169       mkdir [OPTION...] LOCATION...
170           Creates directories.
171
172           The mkdir command is similar to the traditional mkdir utility.
173
174           Options
175               -p, --parent
176                   Create parent directories when necessary.
177
178       monitor [OPTION...] [LOCATION...]
179           Monitors files or directories for changes, such as creation
180           deletion, content and attribute changes, and mount and unmount
181           operations affecting the monitored locations.
182
183           The monitor command uses the GIO file monitoring APIs to do its
184           job. GIO has different implementations for different platforms. The
185           most common implementation on Linux uses inotify.
186
187           Options
188               -d, --dir=LOCATION
189                   Monitor the given location as a directory. Normally, the
190                   file type is used to determine whether to monitor a file or
191                   directory.
192
193               -f, --file=LOCATION
194                   Monitor the given location as a file. Normally, the file
195                   type is used to determine whether to monitor a file or
196                   directory.
197
198               -D, --direct=LOCATION
199                   Monitor the file directly. This allows changes made via
200                   hardlinks to be captured.
201
202               -s, --silent=LOCATION
203                   Monitor the file directly, but don’t report changes.
204
205               -n, --no-moves
206                   Report moves and renames as simple deleted/created events.
207
208               -m, --mounts
209                   Watch for mount events.
210
211       mount [OPTION...] [LOCATION...]
212           Provides commandline access to various aspects of GIO’s mounting
213           functionality.
214
215           Mounting refers to the traditional concept of arranging multiple
216           file systems and devices in a single tree, rooted at /. Classical
217           mounting happens in the kernel and is controlled by the mount
218           utility. GIO expands this concept by introducing mount daemons that
219           can make file systems available to GIO applications without kernel
220           involvement.
221
222           GIO mounts can require authentication, and the mount command may
223           ask for user IDs, passwords, and so on, when required.
224
225           Options
226               -m, --mountable
227                   Mount as mountable.
228
229               -d, --device=ID
230                   Mount volume with device file, or other identifier.
231
232               -u, --unmount
233                   Unmount the location.
234
235               -e, --eject
236                   Eject the location.
237
238               -t, --stop=DEVICE
239                   Stop drive with device file.
240
241               -s, --unmount-scheme=SCHEME
242                   Unmount all mounts with the given scheme.
243
244               -f, --force
245                   Ignore outstanding file operations when unmounting or
246                   ejecting.
247
248               -a, --anonymous
249                   Use an anonymous user when authenticating.
250
251               -l, --list
252                   List all GIO mounts.
253
254               -o, --monitor
255                   Monitor mount-related events.
256
257               -i, --detail
258                   Show extra information.
259
260               --tcrypt-pim
261                   The numeric PIM when unlocking a VeraCrypt volume.
262
263               --tcrypt-hidden
264                   Mount a TCRYPT hidden volume.
265
266               --tcrypt-system
267                   Mount a TCRYPT system volume.
268
269       move [OPTION...] SOURCE... DESTINATION
270           Moves one or more files from SOURCE to DESTINATION. If more than
271           one source is specified, the destination must be a directory.
272
273           The move command is similar to the traditional mv utility.
274
275           Options
276               -T, --no-target-directory
277                   Don’t copy into DESTINATION even if it is a directory.
278
279               -p, --progress
280                   Show progress.
281
282               -i, --interactive
283                   Prompt for confirmation before overwriting files.
284
285               -b, --backup
286                   Create backups of existing destination files.
287
288               -C, --no-copy-fallback
289                   Don’t use copy and delete fallback.
290
291       open LOCATION...
292           Opens files with the default application that is registered to
293           handle files of this type.
294
295           GIO obtains this information from the shared-mime-info database,
296           with per-user overrides stored in
297           $XDG_DATA_HOME/applications/mimeapps.list.
298
299           The mime command can be used to change the default handler for a
300           mimetype.
301
302           Environment variables will not be set on the application, as it may
303           be an existing process which is activated to handle the new file.
304
305       rename LOCATION NAME
306           Renames a file.
307
308           The rename command is similar to the traditional rename utility.
309
310       remove [OPTION...] LOCATION...
311           Deletes each given file.
312
313           This command removes files irreversibly. If you want a reversible
314           way to remove files, see the trash command.
315
316           Note that not all URI schemes that are supported by GIO may allow
317           deletion of files.
318
319           The remove command is similar to the traditional rm utility.
320
321           Options
322               -f, --force
323                   Ignore non-existent and non-deletable files.
324
325       save [OPTION...] DESTINATION
326           Reads from standard input and saves the data to the given location.
327
328           This is similar to just redirecting output to a file using
329           traditional shell syntax, but the save command allows saving to
330           location that GIO can write to.
331
332           Options
333               -b, --backup
334                   Back up existing destination files.
335
336               -c, --create
337                   Only create the destination if it doesn’t exist yet.
338
339               -a, --append
340                   Append to the end of the file.
341
342               -p, --private
343                   When creating, restrict access to the current user.
344
345               -u, --unlink
346                   When replacing, replace as if the destination did not
347                   exist.
348
349               -v, --print-etag
350                   Print the new ETag in the end.
351
352               -e, --etag=ETAG
353                   The ETag of the file that is overwritten.
354
355       set LOCATION ATTRIBUTE VALUE...
356           Sets a file attribute on a file.
357
358           File attributes can be specified with their GIO name, e.g
359           standard::icon. Note that not all GIO file attributes are writable.
360           Use the --query-writable option of the info command to list
361           writable file attributes.
362
363           If the TYPE is unset, VALUE does not have to be specified. If the
364           TYPE is stringv, multiple values can be given.
365
366           Options
367               -t, --type=TYPE
368                   Specifies the type of the attribute. Supported types are
369                   string, stringv, bytestring, boolean, uint32, int32,
370                   uint64, int64 and unset.
371
372                   If the type is not specified, string is assumed.
373
374               -n, --nofollow-symlinks
375                   Don’t follow symbolic links.
376
377       trash [OPTION...] [LOCATION...]
378           Sends files or directories to the ‘Trashcan’. This can be a
379           different folder depending on where the file is located, and not
380           all file systems support this concept. In the common case that the
381           file lives inside a user’s home directory, the trash folder is
382           $XDG_DATA_HOME/Trash.
383
384           Note that moving files to the trash does not free up space on the
385           file system until the ‘Trashcan’ is emptied. If you are interested
386           in deleting a file irreversibly, see the remove command.
387
388           Inspecting and emptying the ‘Trashcan’ is normally supported by
389           graphical file managers such as Nautilus, but you can also see the
390           trash with the command: gio list trash://.
391
392           Options
393               -f, --force
394                   Ignore non-existent and non-deletable files.
395
396               --empty
397                   Empty the trash.
398
399       tree [OPTION...] [LOCATION...]
400           Lists the contents of the given locations recursively, in a
401           tree-like format. If no location is given, it defaults to the
402           current directory.
403
404           The tree command is similar to the traditional tree utility.
405
406           Options
407               -h, --hidden
408                   Show hidden files.
409
410               -l, --follow-symlinks
411                   Follow symbolic links.
412

EXIT STATUS

414       On success 0 is returned, a non-zero failure code otherwise.
415

SEE ALSO

417       cat(1), cp(1), ls(1), mkdir(1), mv(1), rm(1), tree(1).
418
419
420
421GIO                                                                     GIO(1)
Impressum