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 launch DESKTOP-FILE [FILE-ARG...]
20
21       gio list [OPTION...] [LOCATION...]
22
23       gio mime MIMETYPE [HANDLER]
24
25       gio mkdir [OPTION...] LOCATION...
26
27       gio monitor [OPTION...] [LOCATION...]
28
29       gio mount [OPTION...] [LOCATION...]
30
31       gio move [OPTION...] SOURCE... DESTINATION
32
33       gio open LOCATION...
34
35       gio rename LOCATION NAME
36
37       gio remove [OPTION...] LOCATION...
38
39       gio save [OPTION...] DESTINATION
40
41       gio set [OPTION...] LOCATION ATTRIBUTE VALUE...
42
43       gio trash [OPTION...] [LOCATION...]
44
45       gio tree [OPTION...] [LOCATION...]
46

DESCRIPTION

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

COMMANDS

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

EXIT STATUS

434       On success 0 is returned, a non-zero failure code otherwise.
435

SEE ALSO

437       cat(1), cp(1), ls(1), mkdir(1), mv(1), rm(1), tree(1).
438
439
440
441GIO                                                                     GIO(1)
Impressum