Merge branch 'g-clear-pointer-no-side-effects' into 'master'
[glib.git] / docs / reference / gio / gio.xml
blobf2635d0b3d68ce710c15ca754a15d9f448e8bc91
1 <?xml version="1.0"?>
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
3 <refentry id="gio">
4   <refentryinfo>
5     <title>gio</title>
6     <productname>GIO</productname>
7     <authorgroup>
8       <author>
9         <contrib>Developer</contrib>
10         <firstname>Matthias</firstname>
11         <surname>Clasen</surname>
12         <email>mclasen@redhat.com</email>
13       </author>
14     </authorgroup>
15   </refentryinfo>
17   <refmeta>
18     <refentrytitle>gio</refentrytitle>
19     <manvolnum>1</manvolnum>
20     <refmiscinfo class="manual">User Commands</refmiscinfo>
21   </refmeta>
23   <refnamediv>
24     <refname>gio</refname>
25     <refpurpose>GIO commandline tool</refpurpose>
26   </refnamediv>
28   <refsynopsisdiv>
29     <cmdsynopsis>
30       <command>gio</command>
31       <arg choice="plain">help</arg>
32       <arg choice="opt"><replaceable>COMMAND</replaceable></arg>
33     </cmdsynopsis>
34     <cmdsynopsis>
35       <command>gio</command>
36       <arg choice="plain">version</arg>
37     </cmdsynopsis>
38     <cmdsynopsis>
39       <command>gio</command>
40       <arg choice="plain">cat</arg>
41       <arg choice="plain" rep="repeat"><replaceable>LOCATION</replaceable></arg>
42     </cmdsynopsis>
43     <cmdsynopsis>
44       <command>gio</command>
45       <arg choice="plain">copy</arg>
46       <arg choice="opt" rep="repeat"><replaceable>OPTION</replaceable></arg>
47       <arg choice="plain" rep="repeat"><replaceable>SOURCE</replaceable></arg>
48       <arg choice="plain"><replaceable>DESTINATION</replaceable></arg>
49     </cmdsynopsis>
50     <cmdsynopsis>
51       <command>gio</command>
52       <arg choice="plain">info</arg>
53       <arg choice="opt" rep="repeat"><replaceable>OPTION</replaceable></arg>
54       <arg choice="plain" rep="repeat"><replaceable>LOCATION</replaceable></arg>
55     </cmdsynopsis>
56     <cmdsynopsis>
57       <command>gio</command>
58       <arg choice="plain">list</arg>
59       <arg choice="opt" rep="repeat"><replaceable>OPTION</replaceable></arg>
60       <arg choice="opt" rep="repeat"><replaceable>LOCATION</replaceable></arg>
61     </cmdsynopsis>
62     <cmdsynopsis>
63       <command>gio</command>
64       <arg choice="plain">mime</arg>
65       <arg choice="plain"><replaceable>MIMETYPE</replaceable></arg>
66       <arg choice="opt"><replaceable>HANDLER</replaceable></arg>
67     </cmdsynopsis>
68     <cmdsynopsis>
69       <command>gio</command>
70       <arg choice="plain">mkdir</arg>
71       <arg choice="opt" rep="repeat"><replaceable>OPTION</replaceable></arg>
72       <arg choice="plain" rep="repeat"><replaceable>LOCATION</replaceable></arg>
73     </cmdsynopsis>
74     <cmdsynopsis>
75       <command>gio</command>
76       <arg choice="plain">monitor</arg>
77       <arg choice="opt" rep="repeat"><replaceable>OPTION</replaceable></arg>
78       <arg choice="opt" rep="repeat"><replaceable>LOCATION</replaceable></arg>
79     </cmdsynopsis>
80     <cmdsynopsis>
81       <command>gio</command>
82       <arg choice="plain">mount</arg>
83       <arg choice="opt" rep="repeat"><replaceable>OPTION</replaceable></arg>
84       <arg choice="opt" rep="repeat"><replaceable>LOCATION</replaceable></arg>
85     </cmdsynopsis>
86     <cmdsynopsis>
87       <command>gio</command>
88       <arg choice="plain">move</arg>
89       <arg choice="opt" rep="repeat"><replaceable>OPTION</replaceable></arg>
90       <arg choice="plain" rep="repeat"><replaceable>SOURCE</replaceable></arg>
91       <arg choice="plain"><replaceable>DESTINATION</replaceable></arg>
92     </cmdsynopsis>
93     <cmdsynopsis>
94       <command>gio</command>
95       <arg choice="plain">open</arg>
96       <arg choice="plain" rep="repeat"><replaceable>LOCATION</replaceable></arg>
97     </cmdsynopsis>
98     <cmdsynopsis>
99       <command>gio</command>
100       <arg choice="plain">rename</arg>
101       <arg choice="plain"><replaceable>LOCATION</replaceable></arg>
102       <arg choice="plain"><replaceable>NAME</replaceable></arg>
103     </cmdsynopsis>
104     <cmdsynopsis>
105       <command>gio</command>
106       <arg choice="plain">remove</arg>
107       <arg choice="opt" rep="repeat"><replaceable>OPTION</replaceable></arg>
108       <arg choice="plain" rep="repeat"><replaceable>LOCATION</replaceable></arg>
109     </cmdsynopsis>
110     <cmdsynopsis>
111       <command>gio</command>
112       <arg choice="plain">save</arg>
113       <arg choice="opt" rep="repeat"><replaceable>OPTION</replaceable></arg>
114       <arg choice="plain"><replaceable>DESTINATION</replaceable></arg>
115     </cmdsynopsis>
116     <cmdsynopsis>
117       <command>gio</command>
118       <arg choice="plain">set</arg>
119       <arg choice="opt" rep="repeat"><replaceable>OPTION</replaceable></arg>
120       <arg choice="plain"><replaceable>LOCATION</replaceable></arg>
121       <arg choice="plain"><replaceable>ATTRIBUTE</replaceable></arg>
122       <arg choice="plain" rep="repeat"><replaceable>VALUE</replaceable></arg>
123     </cmdsynopsis>
124     <cmdsynopsis>
125       <command>gio</command>
126       <arg choice="plain">trash</arg>
127       <arg choice="opt" rep="repeat"><replaceable>OPTION</replaceable></arg>
128       <arg choice="opt" rep="repeat"><replaceable>LOCATION</replaceable></arg>
129     </cmdsynopsis>
130     <cmdsynopsis>
131       <command>gio</command>
132       <arg choice="plain">tree</arg>
133       <arg choice="opt" rep="repeat"><replaceable>OPTION</replaceable></arg>
134       <arg choice="opt" rep="repeat"><replaceable>LOCATION</replaceable></arg>
135     </cmdsynopsis>
136   </refsynopsisdiv>
138   <refsect1>
139     <title>Description</title>
140     <para><command>gio</command> is a utility that makes many of the GIO
141       features available from the commandline. In doing so, it provides
142       commands that are similar to traditional utilities, but let you
143       use GIO locations instead of local files: for example you can use
144       something like <filename>smb://server/resource/file.txt</filename>
145       as location.</para>
146   </refsect1>
148   <refsect1>
149     <title>Commands</title>
151     <variablelist>
152       <varlistentry>
153         <term>
154           <command>help</command>
155           <arg choice="opt"><replaceable>COMMAND</replaceable></arg>
156         </term>
157         <listitem>
158           <para>Displays a short synopsis of the available commands or provides
159             detailed help on a specific command.</para>
160         </listitem>
161       </varlistentry>
163       <varlistentry>
164         <term>
165           <command>version</command>
166         </term>
167         <listitem>
168           <para>Prints the GLib version to which <command>gio</command>
169             belongs.</para>
170         </listitem>
171       </varlistentry>
173       <varlistentry>
174         <term>
175           <command>cat</command>
176           <arg choice="plain" rep="repeat"><replaceable>LOCATION</replaceable></arg>
177         </term>
178         <listitem>
179           <para>Concatenates the given files and prints them to the standard
180             output.</para>
181           <para>The cat command works just like the traditional cat utility.</para>
182           <para>Note: just pipe through cat if you need its formatting options
183             like -n, -T or other.</para>
184         </listitem>
185       </varlistentry>
187       <varlistentry>
188         <term>
189           <command>copy</command>
190           <arg choice="opt" rep="repeat"><replaceable>OPTION</replaceable></arg>
191           <arg choice="plain" rep="repeat"><replaceable>SOURCE</replaceable></arg>
192           <arg choice="plain"><replaceable>DESTINATION</replaceable></arg>
193         </term>
194         <listitem>
195           <para>Copies one or more files from <replaceable>SOURCE</replaceable>
196             to <replaceable>DESTINATION</replaceable>. If more than one source
197             is specified, the destination must be a directory.</para>
198           <para>The copy command is similar to the traditional cp utility.</para>
199           <refsect3>
200             <title>Options</title>
201             <variablelist>
202               <varlistentry>
203                 <term><option>-T</option>, <option>--no-target-directory</option></term>
204                 <listitem><para>Don't copy into <replaceable>DESTINATION</replaceable> even if it is a directory.</para></listitem>
205               </varlistentry>
206               <varlistentry>
207                 <term><option>-p</option>, <option>--progress</option></term>
208                 <listitem><para>Show progress.</para></listitem>
209               </varlistentry>
210               <varlistentry>
211                 <term><option>-i</option>, <option>--interactive</option></term>
212                 <listitem><para>Prompt for confirmation before overwriting files.</para></listitem>
213               </varlistentry>
214               <varlistentry>
215                 <term><option>--preserve</option></term>
216                 <listitem><para>Preserve all attributes of copied files.</para></listitem>
217               </varlistentry>
218               <varlistentry>
219                 <term><option>-b</option>, <option>--backup</option></term>
220                 <listitem><para>Create backups of existing destination files.</para></listitem>
221               </varlistentry>
222               <varlistentry>
223                 <term><option>-P</option>, <option>--no-dereference</option></term>
224                 <listitem><para>Never follow symbolic links.</para></listitem>
225               </varlistentry>
226             </variablelist>
227           </refsect3>
228         </listitem>
229       </varlistentry>
230       <varlistentry>
231         <term>
232           <command>info</command>
233           <arg choice="opt" rep="repeat"><replaceable>OPTION</replaceable></arg>
234           <arg choice="plain" rep="repeat"><replaceable>LOCATION</replaceable></arg>
235         </term>
236         <listitem>
237           <para>Shows information about the given locations.</para>
238           <para>The info command is similar to the traditional ls utility.</para>
239           <refsect3>
240             <title>Options</title>
241             <variablelist>
242               <varlistentry>
243                 <term><option>-w</option>, <option>--query-writable</option></term>
244                 <listitem><para>List writable attributes.</para></listitem>
245               </varlistentry>
246               <varlistentry>
247                 <term><option>-f</option>, <option>--filesystem</option></term>
248                 <listitem><para>Show information about the filesystem that the given
249                 locations reside on.</para></listitem>
250               </varlistentry>
251               <varlistentry>
252                 <term><option>-a</option> <option>--attributes=<replaceable>ATTRIBUTES</replaceable></option></term>
253                 <listitem><para>The attributes to get.</para>
254                   <para>Attributes can be specified with their GIO name, e.g.
255                     standard::icon, or just by namespace, e.g. unix, or by '*',
256                     which matches all attributes. Several attributes or groups
257                     of attributes can be specified, separated by comma.</para>
258                   <para>By default, all attributes are listed.</para></listitem>
259               </varlistentry>
260               <varlistentry>
261                 <term><option>-n</option>, <option>--nofollow-symlinks</option></term>
262                 <listitem><para>Don't follow symbolic links.</para></listitem>
263               </varlistentry>
264             </variablelist>
265           </refsect3>
266         </listitem>
267       </varlistentry>
269       <varlistentry>
270         <term>
271           <command>list</command>
272           <arg choice="opt" rep="repeat"><replaceable>OPTION</replaceable></arg>
273           <arg choice="opt" rep="repeat"><replaceable>LOCATION</replaceable></arg>
274         </term>
275         <listitem>
276           <para>Lists the contents of the given locations. If no location is
277             given, the contents of the current directory are shown.</para>
278           <para>The list command is similar to the traditional ls utility.</para>
279           <refsect3>
280             <title>Options</title>
281             <variablelist>
282               <varlistentry>
283                 <term><option>-a</option> <option>--attributes=<replaceable>ATTRIBUTES</replaceable></option></term>
284                 <listitem><para>The attributes to get.</para>
285                   <para>Attributes can be specified with their GIO name, e.g.
286                     standard::icon, or just by namespace, e.g. unix, or by '*',
287                     which matches all attributes. Several attributes or groups
288                     of attributes can be specified, separated by comma.</para>
289                   <para>By default, all attributes are listed.</para></listitem>
290               </varlistentry>
291               <varlistentry>
292                 <term><option>-h</option>, <option>--hidden</option></term>
293                 <listitem><para>Show hidden files.</para></listitem>
294               </varlistentry>
295               <varlistentry>
296                 <term><option>-l</option>, <option>--long</option></term>
297                 <listitem><para>Use a long listing format.</para></listitem>
298               </varlistentry>
299               <varlistentry>
300                 <term><option>-n</option>, <option>--nofollow-symlinks</option></term>
301                 <listitem><para>Don't follow symbolic links.</para></listitem>
302               </varlistentry>
303               <varlistentry>
304                 <term><option>-u</option>, <option>--print-uris</option></term>
305                 <listitem><para>Print full URIs.</para></listitem>
306               </varlistentry>
307             </variablelist>
308           </refsect3>
309         </listitem>
310       </varlistentry>
312       <varlistentry>
313         <term>
314           <command>mime</command>
315           <arg choice="plain"><replaceable>MIMETYPE</replaceable></arg>
316           <arg choice="opt"><replaceable>HANDLER</replaceable></arg>
317         </term>
318         <listitem>
319           <para>If no handler is given, the mime command lists the
320             registered and recommended applications for the mimetype.
321             If a handler is given, it is set as the default handler for
322             the mimetype.</para>
323           <para>Handlers must be specified by their desktop file name,
324             including the extension. Example: org.gnome.gedit.desktop.</para>
325         </listitem>
326       </varlistentry>
328       <varlistentry>
329         <term>
330           <command>mkdir</command>
331           <arg choice="opt" rep="repeat"><replaceable>OPTION</replaceable></arg>
332           <arg choice="plain" rep="repeat"><replaceable>LOCATION</replaceable></arg>
333         </term>
334         <listitem>
335           <para>Creates directories.</para>
336           <para>The mkdir command is similar to the traditional mkdir utility.</para>
337           <refsect3>
338             <title>Options</title>
339             <variablelist>
340               <varlistentry>
341                 <term><option>-p</option>, <option>--parent</option></term>
342                 <listitem><para>Create parent directories when necessary.</para></listitem>
343               </varlistentry>
344             </variablelist>
345           </refsect3>
346         </listitem>
347       </varlistentry>
349       <varlistentry>
350         <term>
351           <command>monitor</command>
352           <arg choice="opt" rep="repeat"><replaceable>OPTION</replaceable></arg>
353           <arg choice="opt" rep="repeat"><replaceable>LOCATION</replaceable></arg>
354         </term>
355         <listitem>
356           <para>Monitors files or directories for changes, such as creation
357             deletion, content and attribute changes, and mount and unmount
358             operations affecting the monitored locations.</para>
359           <para>The monitor command uses the GIO file monitoring APIs to do
360             its job. GIO has different implementations for different platforms.
361             The most common implementation on Linux uses inotify.</para>
362           <refsect3>
363             <title>Options</title>
364             <variablelist>
365               <varlistentry>
366                 <term><option>-d</option>, <option>--dir=<replaceable>LOCATION</replaceable></option></term>
367                 <listitem><para>Monitor the given location as a directory. Normally,
368                   the file type is used to determine whether to monitor a file or directory.</para></listitem>
369               </varlistentry>
370               <varlistentry>
371                 <term><option>-f</option>, <option>--file=<replaceable>LOCATION</replaceable></option></term>
372                 <listitem><para>Monitor the given location as a file. Normally,
373                   the file type is used to determine whether to monitor a file or directory.</para></listitem>
374               </varlistentry>
375               <varlistentry>
376                 <term><option>-D</option>, <option>--direct=<replaceable>LOCATION</replaceable></option></term>
377                 <listitem><para>Monitor the file directly. This allows to capture changes made via hardlinks.</para></listitem>
378               </varlistentry>
379               <varlistentry>
380                 <term><option>-s</option>, <option>--silent=<replaceable>LOCATION</replaceable></option></term>
381                 <listitem><para>Monitor the file directly, but don't report changes.</para></listitem>
382               </varlistentry>
383               <varlistentry>
384                 <term><option>-n</option>, <option>--no-moves</option></term>
385                 <listitem><para>Report moves and renames as simple deleted/created events.</para></listitem>
386               </varlistentry>
387               <varlistentry>
388                 <term><option>-m</option>, <option>--mounts</option></term>
389                 <listitem><para>Watch for mount events.</para></listitem>
390               </varlistentry>
391             </variablelist>
392           </refsect3>
393         </listitem>
394       </varlistentry>
396       <varlistentry>
397         <term>
398           <command>mount</command>
399           <arg choice="opt" rep="repeat"><replaceable>OPTION</replaceable></arg>
400           <arg choice="opt" rep="repeat"><replaceable>LOCATION</replaceable></arg>
401         </term>
402         <listitem>
403           <para>Provides commandline access to various aspects of GIOs mounting
404             functionality.</para>
405           <para>Mounting refers to the traditional concept of arranging multiple
406             file systems and devices in a single tree, rooted at /. Classical
407             mounting happens in the kernel and is controlle by the mount utility.
408             GIO expands this concept by introducing mount daemons that can make
409             file systems available to GIO applications without kernel
410             involvement.</para>
411           <para>GIO mounts can require authentication, and the mount command
412             may ask for user IDs, passwords, and so on, when required.</para>
413           <refsect3>
414             <title>Options</title>
415             <variablelist>
416               <varlistentry>
417                 <term><option>-m</option>, <option>--mountable</option></term>
418                 <listitem><para>Mount as mountable.</para></listitem>
419               </varlistentry>
420               <varlistentry>
421                 <term><option>-d</option>, <option>--device=<replaceable>DEVICE</replaceable></option></term>
422                 <listitem><para>Mount volume with device file.</para></listitem>
423               </varlistentry>
424               <varlistentry>
425                 <term><option>-u</option>, <option>--unmount</option></term>
426                 <listitem><para>Unmount the location.</para></listitem>
427               </varlistentry>
428               <varlistentry>
429                 <term><option>-e</option>, <option>--eject</option></term>
430                 <listitem><para>Eject the location.</para></listitem>
431               </varlistentry>
432               <varlistentry>
433                 <term><option>-s</option>, <option>--unmount-scheme=<replaceable>SCHEME</replaceable></option></term>
434                 <listitem><para>Unmount all mounts with the given scheme.</para></listitem>
435               </varlistentry>
436               <varlistentry>
437                 <term><option>-f</option>, <option>--force</option></term>
438                 <listitem><para>Ignore outstanding file operations when unmounting or ejecting.</para></listitem>
439               </varlistentry>
440               <varlistentry>
441                 <term><option>-a</option>, <option>--anonymous</option></term>
442                 <listitem><para>Use an anonymous user when authenticating.</para></listitem>
443               </varlistentry>
444               <varlistentry>
445                 <term><option>-l</option>, <option>--list</option></term>
446                 <listitem><para>List all GIO mounts.</para></listitem>
447               </varlistentry>
448               <varlistentry>
449                 <term><option>-o</option>, <option>--monitor</option></term>
450                 <listitem><para>Monitor mount-related events.</para>
451                 </listitem>
452               </varlistentry>
453               <varlistentry>
454                 <term><option>-i</option>, <option>--detail</option></term>
455                 <listitem><para>Show extra information.</para>
456                 </listitem>
457               </varlistentry>
458               <varlistentry>
459                 <term><option>--tcrypt-pim</option></term>
460                 <listitem><para>The numeric PIM when unlocking a VeraCrypt volume.</para>
461                 </listitem>
462               </varlistentry>
463               <varlistentry>
464                 <term><option>--tcrypt-hidden</option></term>
465                 <listitem><para>Mount a TCRYPT hidden volume.</para>
466                 </listitem>
467               </varlistentry>
468               <varlistentry>
469                 <term><option>--tcrypt-system</option></term>
470                 <listitem><para>Mount a TCRYPT system volume.</para>
471                 </listitem>
472               </varlistentry>
473             </variablelist>
474           </refsect3>
475         </listitem>
476       </varlistentry>
478       <varlistentry>
479         <term>
480           <command>move</command>
481           <arg choice="opt" rep="repeat"><replaceable>OPTION</replaceable></arg>
482           <arg choice="plain" rep="repeat"><replaceable>SOURCE</replaceable></arg>
483           <arg choice="plain"><replaceable>DESTINATION</replaceable></arg>
484         </term>
485         <listitem>
486           <para>Moves one or more files from <replaceable>SOURCE</replaceable>
487             to <replaceable>DESTINATION</replaceable>. If more than one source
488             is specified, the destination must be a directory.</para>
489           <para>The move command is similar to the traditional mv utility.</para>
490         </listitem>
491       </varlistentry>
493       <varlistentry>
494         <term>
495           <command>open</command>
496           <arg choice="plain" rep="repeat"><replaceable>LOCATION</replaceable></arg>
497         </term>
498         <listitem>
499           <para>Opens files with the default application that is registered
500             to handle files of this type.</para>
501           <para>GIO obtains this information from the shared-mime-info
502             database, with per-user overrides stored in
503             <filename><envar>$XDG_DATA_HOME</envar>/applications/mimeapps.list</filename>.</para>
504           <para>The mime command can be used to change the default handler for
505             a mimetype.</para>
506         </listitem>
507       </varlistentry>
509       <varlistentry>
510         <term>
511           <command>rename</command>
512           <arg choice="plain"><replaceable>LOCATION</replaceable></arg>
513           <arg choice="plain"><replaceable>NAME</replaceable></arg>
514         </term>
515         <listitem>
516           <para>Renames a file.</para>
517           <para>The rename command is similar to the traditional rename utility.</para>
518         </listitem>
519       </varlistentry>
521       <varlistentry>
522         <term>
523           <command>remove</command>
524           <arg choice="opt" rep="repeat"><replaceable>OPTION</replaceable></arg>
525           <arg choice="plain" rep="repeat"><replaceable>LOCATION</replaceable></arg>
526         </term>
527         <listitem>
528           <para>Deletes each given file.</para>
529           <para>This command removes files irreversibly. If you want a reversible
530             way to remove files, see the trash command.</para>
531           <para>Note that not all URI schemes that are supported by GIO may
532             allow deletion of files.</para>
533           <para> The remove command is similar to the traditional rm utility.</para>
534           <refsect3>
535             <title>Options</title>
536             <variablelist>
537               <varlistentry>
538                 <term><option>-f</option>, <option>--force</option></term>
539                 <listitem><para>Ignore non-existent and non-deletable files.</para></listitem>
540               </varlistentry>
541             </variablelist>
542           </refsect3>
543         </listitem>
544       </varlistentry>
546       <varlistentry>
547         <term>
548           <command>save</command>
549           <arg choice="opt" rep="repeat"><replaceable>OPTION</replaceable></arg>
550           <arg choice="plain"><replaceable>DESTINATION</replaceable></arg>
551         </term>
552         <listitem>
553           <para>Reads from standard input and saves the data to the given
554             location.</para>
555           <para>This is similar to just redirecting output to a file using
556             traditional shell syntax, but the save command allows saving to
557             location that GIO can write to.</para>
558           <refsect3>
559             <title>Options</title>
560             <variablelist>
561               <varlistentry>
562                 <term><option>-b</option>, <option>--backup</option></term>
563                 <listitem><para>Backup existing destination files.</para></listitem>
564               </varlistentry>
565               <varlistentry>
566                 <term><option>-c</option>, <option>--create</option></term>
567                 <listitem><para>Only create the destination if it doesn't exist yet.</para></listitem>
568               </varlistentry>
569               <varlistentry>
570                 <term><option>-a</option>, <option>--append</option></term>
571                 <listitem><para>Append to the end of the file.</para></listitem>
572               </varlistentry>
573               <varlistentry>
574                 <term><option>-p</option>, <option>--private</option></term>
575                 <listitem><para>When creating, restrict access to the current user.</para></listitem>
576               </varlistentry>
577               <varlistentry>
578                 <term><option>-u</option>, <option>--unlink</option></term>
579                 <listitem><para>When replacing, replace as if the destination did not exist.</para></listitem>
580               </varlistentry>
581               <varlistentry>
582                 <term><option>-v</option>, <option>--print-etag</option></term>
583                 <listitem><para>Print the new etag in the end.</para></listitem>
584               </varlistentry>
585               <varlistentry>
586                 <term><option>-e</option>, <option>--etag=<replaceable>ETAG</replaceable></option></term>
587                 <listitem><para>The etag of the file that is overwritten.</para></listitem>
588               </varlistentry>
589             </variablelist>
590           </refsect3>
591         </listitem>
592       </varlistentry>
594       <varlistentry>
595         <term>
596           <command>set</command>
597           <arg choice="plain"><replaceable>LOCATION</replaceable></arg>
598           <arg choice="plain"><replaceable>ATTRIBUTE</replaceable></arg>
599           <arg choice="plain" rep="repeat"><replaceable>VALUE</replaceable></arg>
600         </term>
601         <listitem>
602           <para>Allows to set a file attribute on a file.</para>
603           <para>File attributes can be specified with their GIO name, e.g
604             standard::icon. Note that not all GIO file attributes are writable.
605             Use the --query-writable option of the info command to list
606             writable file attributes.</para>
607           <para>If the <replaceable>TYPE</replaceable> is unset,
608             <replaceable>VALUE</replaceable> does not have to be specified.
609             If the type is stringv, multiple values can be given.</para>
610           <refsect3>
611             <title>Options</title>
612             <variablelist>
613               <varlistentry>
614                 <term><option>-t</option>, <option>--type=<replaceable>TYPE</replaceable></option></term>
615                 <listitem><para>Specifies the type of the attribute. Supported
616                   types are string, stringv, bytestring, boolean, uint32, int32,
617                   uint64, int64 and unset.</para>
618                   <para>If the type is not specified, string is assumed.</para>
619                 </listitem>
620               </varlistentry>
621               <varlistentry>
622                 <term><option>-n</option>, <option>--nofollow-symlinks</option></term>
623                 <listitem><para>Don't follow symbolic links.</para></listitem>
624               </varlistentry>
625             </variablelist>
626           </refsect3>
627         </listitem>
628       </varlistentry>
630       <varlistentry>
631         <term>
632           <command>trash</command>
633           <arg choice="opt" rep="repeat"><replaceable>OPTION</replaceable></arg>
634           <arg choice="opt" rep="repeat"><replaceable>LOCATION</replaceable></arg>
635         </term>
636         <listitem>
637           <para>Sends files or directories to the "Trashcan". This can be a
638             different folder depending on where the file is located, and not
639             all file systems support this concept. In the common case that the
640             file lives inside a users home directory, the trash folder is
641             <filename><envar>$XDG_DATA_HOME</envar>/Trash</filename>.</para>
642           <para>Note that moving files to the trash does not free up space on
643             the file system until the "Trashcan" is emptied. If you are interested
644             in deleting a file irreversibly, see the remove command.</para>
645           <para>Inspecting and emptying the "Trashcan" is normally supported by
646             graphical file managers such as nautilus, but you can also see the
647             trash with the command: gio list trash://.</para>
648           <refsect3>
649             <title>Options</title>
650             <variablelist>
651               <varlistentry>
652                 <term><option>-f</option>, <option>--force</option></term>
653                 <listitem><para>Ignore non-existent and non-deletable files.</para></listitem>
654               </varlistentry>
655               <varlistentry>
656                 <term><option>--empty</option></term>
657                 <listitem><para>Empty the trash.</para></listitem>
658               </varlistentry>
659             </variablelist>
660           </refsect3>
661         </listitem>
662       </varlistentry>
664       <varlistentry>
665         <term>
666           <command>tree</command>
667           <arg choice="opt" rep="repeat"><replaceable>OPTION</replaceable></arg>
668           <arg choice="opt" rep="repeat"><replaceable>LOCATION</replaceable></arg>
669         </term>
670         <listitem>
671           <para>Lists the contents of the given locations recursively, in a
672             tree-like format. If no location is given, it defaults to the current
673             directory.</para>
674           <para>The tree command is similar to the traditional tree utility.</para>
675           <refsect3>
676             <title>Options</title>
677             <variablelist>
678               <varlistentry>
679                 <term><option>-h</option>, <option>--hidden</option></term>
680                 <listitem><para>Show hidden files.</para></listitem>
681               </varlistentry>
682               <varlistentry>
683                 <term><option>-l</option>, <option>--follow-symlinks</option></term>
684                 <listitem><para>Follow symbolic links.</para></listitem>
685               </varlistentry>
686             </variablelist>
687           </refsect3>
688         </listitem>
689       </varlistentry>
690     </variablelist>
691   </refsect1>
693   <refsect1>
694     <title>Exit status</title>
695     <para>On success 0 is returned, a non-zero failure code otherwise.</para>
696   </refsect1>
698   <refsect1>
699     <title>See Also</title>
700     <para>
701       <citerefentry>
702         <refentrytitle>cat</refentrytitle>
703         <manvolnum>1</manvolnum>
704       </citerefentry>,
705       <citerefentry>
706         <refentrytitle>cp</refentrytitle>
707         <manvolnum>1</manvolnum>
708       </citerefentry>,
709       <citerefentry>
710         <refentrytitle>ls</refentrytitle>
711         <manvolnum>1</manvolnum>
712       </citerefentry>,
713       <citerefentry>
714         <refentrytitle>mkdir</refentrytitle>
715         <manvolnum>1</manvolnum>
716       </citerefentry>,
717       <citerefentry>
718         <refentrytitle>mv</refentrytitle>
719         <manvolnum>1</manvolnum>
720       </citerefentry>,
721       <citerefentry>
722         <refentrytitle>rm</refentrytitle>
723         <manvolnum>1</manvolnum>
724       </citerefentry>,
725       <citerefentry>
726         <refentrytitle>tree</refentrytitle>
727         <manvolnum>1</manvolnum>
728       </citerefentry>.
729     </para>
730   </refsect1>
731 </refentry>