b4cde8169ce8dfa76dc8444a20f1aa0adb4b110e
[libguestfs.git] / fish / guestfish.pod
1 =encoding utf8
2
3 =head1 NAME
4
5 guestfish - the libguestfs Filesystem Interactive SHell
6
7 =head1 SYNOPSIS
8
9  guestfish [--options] [commands]
10
11  guestfish
12
13  guestfish -a disk.img
14
15  guestfish -a disk.img -m dev[:mountpoint]
16
17  guestfish -i libvirt-domain
18
19  guestfish -i disk.img [disk.img ...]
20
21 =head1 EXAMPLES
22
23 =head2 As an interactive shell
24
25  $ guestfish
26  
27  Welcome to guestfish, the libguestfs filesystem interactive shell for
28  editing virtual machine filesystems.
29  
30  Type: 'help' for help with commands
31        'quit' to quit the shell
32  
33  ><fs> help
34
35 =head2 From shell scripts
36
37 Create a new C</etc/motd> file in a guest:
38
39  guestfish <<_EOF_
40  add disk.img
41  run
42  mount /dev/vg_guest/lv_root /
43  write_file /etc/motd "Welcome, new users" 0
44  _EOF_
45
46 List the LVM logical volumes in a guest:
47
48  guestfish -a disk.img --ro <<_EOF_
49  run
50  lvs
51  _EOF_
52
53 =head2 On one command line
54
55 Update C</etc/resolv.conf> in a guest:
56
57  guestfish \
58    add disk.img : run : mount /dev/vg_guest/lv_root / : \
59    write-file /etc/resolv.conf "nameserver 1.2.3.4" 0
60
61 Edit C</boot/grub/grub.conf> interactively:
62
63  guestfish --add disk.img \
64    --mount /dev/vg_guest/lv_root \
65    --mount /dev/sda1:/boot \
66    edit /boot/grub/grub.conf
67
68 =head2 Using virt-inspector
69
70 Use the I<-i> option to get virt-inspector to mount
71 the filesystems automatically as they would be mounted
72 in the virtual machine:
73
74  guestfish --ro -i disk.img cat /etc/group
75
76 =head2 As a script interpreter
77
78 Create a 100MB disk containing an ext2-formatted partition:
79
80  #!/usr/bin/guestfish -f
81  sparse test1.img 100M
82  run
83  part-disk /dev/sda mbr
84  mkfs ext2 /dev/sda1
85
86 =head2 Start with a prepared disk
87
88 An alternate way to create a 100MB disk called C<test1.img> containing
89 a single ext2-formatted partition:
90
91  guestfish -N fs
92
93 To list what is available do:
94
95  guestfish -N list | less
96
97 =head2 Remote control
98
99  eval `guestfish --listen --ro`
100  guestfish --remote add disk.img
101  guestfish --remote run
102  guestfish --remote lvs
103
104 =head1 DESCRIPTION
105
106 Guestfish is a shell and command-line tool for examining and modifying
107 virtual machine filesystems.  It uses libguestfs and exposes all of
108 the functionality of the guestfs API, see L<guestfs(3)>.
109
110 Guestfish gives you structured access to the libguestfs API, from
111 shell scripts or the command line or interactively.  If you want to
112 rescue a broken virtual machine image, you should look at the
113 L<virt-rescue(1)> command.
114
115 Using guestfish in read/write mode on live virtual machines can be
116 dangerous, potentially causing disk corruption.  Use the I<--ro>
117 (read-only) option to use guestfish safely if the disk image or
118 virtual machine might be live.
119
120 =head1 OPTIONS
121
122 =over 4
123
124 =item B<--help>
125
126 Displays general help on options.
127
128 =item B<-h> | B<--cmd-help>
129
130 Lists all available guestfish commands.
131
132 =item B<-h cmd> | B<--cmd-help cmd>
133
134 Displays detailed help on a single command C<cmd>.
135
136 =item B<-a image> | B<--add image>
137
138 Add a block device or virtual machine image to the shell.
139
140 =item B<-D> | B<--no-dest-paths>
141
142 Don't tab-complete paths on the guest filesystem.  It is useful to be
143 able to hit the tab key to complete paths on the guest filesystem, but
144 this causes extra "hidden" guestfs calls to be made, so this option is
145 here to allow this feature to be disabled.
146
147 =item B<-f file> | B<--file file>
148
149 Read commands from C<file>.  To write pure guestfish
150 scripts, use:
151
152  #!/usr/bin/guestfish -f
153
154 =item B<-i> | B<--inspector>
155
156 Run virt-inspector on the named libvirt domain or list of disk
157 images.  If virt-inspector is available and if it can identify
158 the domain or disk images, then partitions will be mounted
159 correctly at start-up.
160
161 Typical usage is either:
162
163  guestfish -i myguest
164
165 (for an inactive libvirt domain called I<myguest>), or:
166
167  guestfish --ro -i myguest
168
169 (for active domains, readonly), or specify the block device directly:
170
171  guestfish -i /dev/Guests/MyGuest
172
173 You cannot use I<-a>, I<-m>, I<-N>, I<--listen>, I<--remote> or
174 I<--selinux> in conjunction with this option, and options other than
175 I<--ro> might not behave correctly.
176
177 See also: L<virt-inspector(1)>.
178
179 =item B<--listen>
180
181 Fork into the background and listen for remote commands.  See section
182 L</REMOTE CONTROL GUESTFISH OVER A SOCKET> below.
183
184 =item B<-m dev[:mountpoint]> | B<--mount dev[:mountpoint]>
185
186 Mount the named partition or logical volume on the given mountpoint.
187
188 If the mountpoint is omitted, it defaults to C</>.
189
190 You have to mount something on C</> before most commands will work.
191
192 If any I<-m> or I<--mount> options are given, the guest is
193 automatically launched.
194
195 If you don't know what filesystems a disk image contains, you
196 can either run guestfish without this option, then list the partitions
197 and LVs available (see L</list-partitions> and L</lvs> commands),
198 or you can use the L<virt-list-filesystems(1)> program.
199
200 =item B<-n> | B<--no-sync>
201
202 Disable autosync.  This is enabled by default.  See the discussion
203 of autosync in the L<guestfs(3)> manpage.
204
205 =item B<-N type> | B<--new type> | B<-N list>
206
207 Prepare a fresh disk image formatted as "type".  This is an
208 alternative to the I<-a> option: whereas I<-a> adds an existing disk,
209 I<-N> creates a preformatted disk with a filesystem and adds it.
210 See L</PREPARED DISK IMAGES> below.
211
212 =item B<--remote[=pid]>
213
214 Send remote commands to C<$GUESTFISH_PID> or C<pid>.  See section
215 L</REMOTE CONTROL GUESTFISH OVER A SOCKET> below.
216
217 =item B<-r> | B<--ro>
218
219 This changes the I<-a> and I<-m> options so that disks are added and
220 mounts are done read-only (see L<guestfs(3)/guestfs_mount_ro>).
221
222 The option must always be used if the disk image or virtual machine
223 might be running, and is generally recommended in cases where you
224 don't need write access to the disk.
225
226 Note that prepared disk images created with I<-N> are not affected by
227 the I<--ro> option.
228
229 =item B<--selinux>
230
231 Enable SELinux support for the guest.  See L<guestfs(3)/SELINUX>.
232
233 =item B<-v> | B<--verbose>
234
235 Enable very verbose messages.  This is particularly useful if you find
236 a bug.
237
238 =item B<-V> | B<--version>
239
240 Display the guestfish / libguestfs version number and exit.
241
242 =item B<-x>
243
244 Echo each command before executing it.
245
246 =back
247
248 =head1 COMMANDS ON COMMAND LINE
249
250 Any additional (non-option) arguments are treated as commands to
251 execute.
252
253 Commands to execute should be separated by a colon (C<:>), where the
254 colon is a separate parameter.  Thus:
255
256  guestfish cmd [args...] : cmd [args...] : cmd [args...] ...
257
258 If there are no additional arguments, then we enter a shell, either an
259 interactive shell with a prompt (if the input is a terminal) or a
260 non-interactive shell.
261
262 In either command line mode or non-interactive shell, the first
263 command that gives an error causes the whole shell to exit.  In
264 interactive mode (with a prompt) if a command fails, you can continue
265 to enter commands.
266
267 =head1 USING launch (OR run)
268
269 As with L<guestfs(3)>, you must first configure your guest by adding
270 disks, then launch it, then mount any disks you need, and finally
271 issue actions/commands.  So the general order of the day is:
272
273 =over 4
274
275 =item *
276
277 add or -a/--add
278
279 =item *
280
281 launch (aka run)
282
283 =item *
284
285 mount or -m/--mount
286
287 =item *
288
289 any other commands
290
291 =back
292
293 C<run> is a synonym for C<launch>.  You must C<launch> (or C<run>)
294 your guest before mounting or performing any other commands.
295
296 The only exception is that if the I<-m> or I<--mount> option was
297 given, the guest is automatically run for you (simply because
298 guestfish can't mount the disks you asked for without doing this).
299
300 =head1 QUOTING
301
302 You can quote ordinary parameters using either single or double
303 quotes.  For example:
304
305  add "file with a space.img"
306
307  rm '/file name'
308
309  rm '/"'
310
311 A few commands require a list of strings to be passed.  For these, use
312 a whitespace-separated list, enclosed in quotes.  Strings containing whitespace
313 to be passed through must be enclosed in single quotes.  A literal single quote
314 must be escaped with a backslash.
315
316  vgcreate VG "/dev/sda1 /dev/sdb1"
317  command "/bin/echo 'foo      bar'"
318  command "/bin/echo \'foo\'"
319
320 =head1 NUMBERS
321
322 Commands which take integers as parameters use the C convention which
323 is to use C<0> to prefix an octal number or C<0x> to prefix a
324 hexadecimal number.  For example:
325
326  1234      decimal number 1234
327  02322     octal number, equivalent to decimal 1234
328  0x4d2     hexadecimal number, equivalent to decimal 1234
329
330 When using the C<chmod> command, you almost always want to specify an
331 octal number for the mode, and you must prefix it with C<0> (unlike
332 the Unix L<chmod(1)> program):
333
334  chmod 0777 /public  # OK
335  chmod 777 /public   # WRONG! This is mode 777 decimal = 01411 octal.
336
337 Commands that return numbers usually print them in decimal, but
338 some commands print numbers in other radices (eg. C<umask> prints
339 the mode in octal, preceeded by C<0>).
340
341 =head1 WILDCARDS AND GLOBBING
342
343 Neither guestfish nor the underlying guestfs API performs
344 wildcard expansion (globbing) by default.  So for example the
345 following will not do what you expect:
346
347  rm-rf /home/*
348
349 Assuming you don't have a directory literally called C</home/*>
350 then the above command will return an error.
351
352 To perform wildcard expansion, use the C<glob> command.
353
354  glob rm-rf /home/*
355
356 runs C<rm-rf> on each path that matches (ie. potentially running
357 the command many times), equivalent to:
358
359  rm-rf /home/jim
360  rm-rf /home/joe
361  rm-rf /home/mary
362
363 C<glob> only works on simple guest paths and not on device names.
364
365 If you have several parameters, each containing a wildcard, then glob
366 will perform a cartesian product.
367
368 =head1 COMMENTS
369
370 Any line which starts with a I<#> character is treated as a comment
371 and ignored.  The I<#> can optionally be preceeded by whitespace,
372 but B<not> by a command.  For example:
373
374  # this is a comment
375          # this is a comment
376  foo # NOT a comment
377
378 Blank lines are also ignored.
379
380 =head1 RUNNING COMMANDS LOCALLY
381
382 Any line which starts with a I<!> character is treated as a command
383 sent to the local shell (C</bin/sh> or whatever L<system(3)> uses).
384 For example:
385
386  !mkdir local
387  tgz-out /remote local/remote-data.tar.gz
388
389 will create a directory C<local> on the host, and then export
390 the contents of C</remote> on the mounted filesystem to
391 C<local/remote-data.tar.gz>.  (See C<tgz-out>).
392
393 To change the local directory, use the C<lcd> command.  C<!cd> will
394 have no effect, due to the way that subprocesses work in Unix.
395
396 =head1 PIPES
397
398 Use C<command E<lt>spaceE<gt> | command> to pipe the output of the
399 first command (a guestfish command) to the second command (any host
400 command).  For example:
401
402  cat /etc/passwd | awk -F: '$3 == 0 { print }'
403
404 (where C<cat> is the guestfish cat command, but C<awk> is the host awk
405 program).  The above command would list all accounts in the guest
406 filesystem which have UID 0, ie. root accounts including backdoors.
407 Other examples:
408
409  hexdump /bin/ls | head
410  list-devices | tail -1
411  tgz-out / - | tar ztf -
412
413 The space before the pipe symbol is required, any space after the pipe
414 symbol is optional.  Everything after the pipe symbol is just passed
415 straight to the host shell, so it can contain redirections, globs and
416 anything else that makes sense on the host side.
417
418 To use a literal argument which begins with a pipe symbol, you have
419 to quote it, eg:
420
421  echo "|"
422
423 =head1 HOME DIRECTORIES
424
425 If a parameter starts with the character C<~> then the tilde may be
426 expanded as a home directory path (either C<~> for the current user's
427 home directory, or C<~user> for another user).
428
429 Note that home directory expansion happens for users known I<on the
430 host>, not in the guest filesystem.
431
432 To use a literal argument which begins with a tilde, you have to quote
433 it, eg:
434
435  echo "~"
436
437 =head1 WINDOWS PATHS
438
439 If a path is prefixed with C<win:> then you can use Windows-style
440 paths (with some limitations).  The following commands are equivalent:
441
442  file /WINDOWS/system32/config/system.LOG
443
444  file win:/windows/system32/config/system.log
445
446  file win:\windows\system32\config\system.log
447
448  file WIN:C:\Windows\SYSTEM32\conFIG\SYSTEM.LOG
449
450 This syntax implicitly calls C<case-sensitive-path> (q.v.) so it also
451 handles case insensitivity like Windows would.  This only works in
452 argument positions that expect a path.
453
454 =head1 UPLOADING AND DOWNLOADING FILES
455
456 For commands such as C<upload>, C<download>, C<tar-in>, C<tar-out> and
457 others which upload from or download to a local file, you can use the
458 special filename C<-> to mean "from stdin" or "to stdout".  For example:
459
460  upload - /foo
461
462 reads stdin and creates from that a file C</foo> in the disk image,
463 and:
464
465  tar-out /etc - | tar tf -
466
467 writes the tarball to stdout and then pipes that into the external
468 "tar" command (see L</PIPES>).
469
470 When using C<-> to read from stdin, the input is read up to the end of
471 stdin.  You can also use a special "heredoc"-like syntax to read up to
472 some arbitrary end marker:
473
474  upload -<<END /foo
475  input line 1
476  input line 2
477  input line 3
478  END
479
480 Any string of characters can be used instead of C<END>.  The end
481 marker must appear on a line of its own, without any preceeding or
482 following characters (not even spaces).
483
484 Note that the C<-E<lt>E<lt>> syntax only applies to parameters used to
485 upload local files (so-called "FileIn" parameters in the generator).
486
487 =head1 EXIT ON ERROR BEHAVIOUR
488
489 By default, guestfish will ignore any errors when in interactive mode
490 (ie. taking commands from a human over a tty), and will exit on the
491 first error in non-interactive mode (scripts, commands given on the
492 command line).
493
494 If you prefix a command with a I<-> character, then that command will
495 not cause guestfish to exit, even if that (one) command returns an
496 error.
497
498 =head1 REMOTE CONTROL GUESTFISH OVER A SOCKET
499
500 Guestfish can be remote-controlled over a socket.  This is useful
501 particularly in shell scripts where you want to make several different
502 changes to a filesystem, but you don't want the overhead of starting
503 up a guestfish process each time.
504
505 Start a guestfish server process using:
506
507  eval `guestfish --listen`
508
509 and then send it commands by doing:
510
511  guestfish --remote cmd [...]
512
513 To cause the server to exit, send it the exit command:
514
515  guestfish --remote exit
516
517 Note that the server will normally exit if there is an error in a
518 command.  You can change this in the usual way.  See section
519 L</EXIT ON ERROR BEHAVIOUR>.
520
521 =head2 CONTROLLING MULTIPLE GUESTFISH PROCESSES
522
523 The C<eval> statement sets the environment variable C<$GUESTFISH_PID>,
524 which is how the I<--remote> option knows where to send the commands.
525 You can have several guestfish listener processes running using:
526
527  eval `guestfish --listen`
528  pid1=$GUESTFISH_PID
529  eval `guestfish --listen`
530  pid2=$GUESTFISH_PID
531  ...
532  guestfish --remote=$pid1 cmd
533  guestfish --remote=$pid2 cmd
534
535 =head2 REMOTE CONTROL DETAILS
536
537 Remote control happens over a Unix domain socket called
538 C</tmp/.guestfish-$UID/socket-$PID>, where C<$UID> is the effective
539 user ID of the process, and C<$PID> is the process ID of the server.
540
541 Guestfish client and server versions must match exactly.
542
543 =head1 PREPARED DISK IMAGES
544
545 Use the I<-N type> or I<--new type> parameter to select one of a set
546 of preformatted disk images that guestfish can make for you to save
547 typing.  This is particularly useful for testing purposes.  This
548 option is used instead of the I<-a> option, and like I<-a> can appear
549 multiple times (and can be mixed with I<-a>).
550
551 The new disk is called C<test1.img> for the first I<-N>, C<test2.img>
552 for the second and so on.  Existing files in the current directory are
553 not overwritten, so you may need to do C<rm -f test1.img>.
554
555 The type briefly describes how the disk should be sized, partitioned,
556 how filesystem(s) should be created, and how content should be added.
557 Optionally the type can be followed by extra parameters, separated by
558 C<:> (colon) characters.  For example, I<-N fs> creates a default
559 100MB, sparsely-allocated disk, containing a single partition, with
560 the partition formatted as ext2.  I<-N fs:ext4:1G> is the same, but
561 for an ext4 filesystem on a 1GB disk instead.
562
563 To list the available types and any extra parameters they take, run:
564
565  guestfish -N list | less
566
567 Note that the prepared filesystem is not mounted.  You would usually
568 have to use the C<mount /dev/sda1 /> command or add the
569 I<-m /dev/sda1> option.
570
571 If any I<-N> or I<--new> options are given, the guest is automatically
572 launched.
573
574 =head2 EXAMPLES
575
576 Create a 100MB disk with an ext4-formatted partition:
577
578  guestfish -N fs:ext4
579
580 Create a 32MB disk with a VFAT-formatted partition, and mount it:
581
582  guestfish -N fs:vfat:32M -m /dev/sda1
583
584 Create a blank 200MB disk:
585
586  guestfish -N disk:200M
587
588 =head1 GUESTFISH COMMANDS
589
590 The commands in this section are guestfish convenience commands, in
591 other words, they are not part of the L<guestfs(3)> API.
592
593 =head2 alloc | allocate
594
595  alloc filename size
596
597 This creates an empty (zeroed) file of the given size, and then adds
598 so it can be further examined.
599
600 For more advanced image creation, see L<qemu-img(1)> utility.
601
602 Size can be specified (where C<nn> means a number):
603
604 =over 4
605
606 =item C<nn> or C<nn>K or C<nn>KB
607
608 number of kilobytes, eg: C<1440> = standard 3.5in floppy
609
610 =item C<nn>M or C<nn>MB
611
612 number of megabytes
613
614 =item C<nn>G or C<nn>GB
615
616 number of gigabytes
617
618 =item C<nn>T or C<nn>TB
619
620 number of terabytes
621
622 =item C<nn>P or C<nn>PB
623
624 number of petabytes
625
626 =item C<nn>E or C<nn>EB
627
628 number of exabytes
629
630 =item C<nn>sects
631
632 number of 512 byte sectors
633
634 =back
635
636 =head2 echo
637
638  echo [params ...]
639
640 This echos the parameters to the terminal.
641
642 =head2 edit | vi | emacs
643
644  edit filename
645
646 This is used to edit a file.  It downloads the file, edits it
647 locally using your editor, then uploads the result.
648
649 The editor is C<$EDITOR>.  However if you use the alternate
650 commands C<vi> or C<emacs> you will get those corresponding
651 editors.
652
653 NOTE: This will not work reliably for large files
654 (> 2 MB) or binary files containing \0 bytes.
655
656 =head2 glob
657
658  glob command args...
659
660 Expand wildcards in any paths in the args list, and run C<command>
661 repeatedly on each matching path.
662
663 See section WILDCARDS AND GLOBBING.
664
665 =head2 help
666
667  help
668  help cmd
669
670 Without any parameter, this lists all commands.  With a C<cmd>
671 parameter, this displays detailed help for a command.
672
673 =head2 lcd
674
675  lcd directory
676
677 Change the local directory, ie. the current directory of guestfish
678 itself.
679
680 Note that C<!cd> won't do what you might expect.
681
682 =head2 more | less
683
684  more filename
685
686  less filename
687
688 This is used to view a file.
689
690 The default viewer is C<$PAGER>.  However if you use the alternate
691 command C<less> you will get the C<less> command specifically.
692
693 NOTE: This will not work reliably for large files
694 (> 2 MB) or binary files containing \0 bytes.
695
696 =head2 quit | exit
697
698 This exits guestfish.  You can also use C<^D> key.
699
700 =head2 reopen
701
702  reopen
703
704 Close and reopen the libguestfs handle.  It is not necessary to use
705 this normally, because the handle is closed properly when guestfish
706 exits.  However this is occasionally useful for testing.
707
708 =head2 sparse
709
710  sparse filename size
711
712 This creates an empty sparse file of the given size, and then adds
713 so it can be further examined.
714
715 In all respects it works the same as the C<alloc> command, except that
716 the image file is allocated sparsely, which means that disk blocks are
717 not assigned to the file until they are needed.  Sparse disk files
718 only use space when written to, but they are slower and there is a
719 danger you could run out of real disk space during a write operation.
720
721 For more advanced image creation, see L<qemu-img(1)> utility.
722
723 Size can be specified (where C<nn> means a number):
724
725 =over 4
726
727 =item C<nn> or C<nn>K or C<nn>KB
728
729 number of kilobytes, eg: C<1440> = standard 3.5in floppy
730
731 =item C<nn>M or C<nn>MB
732
733 number of megabytes
734
735 =item C<nn>G or C<nn>GB
736
737 number of gigabytes
738
739 =item C<nn>T or C<nn>TB
740
741 number of terabytes
742
743 =item C<nn>P or C<nn>PB
744
745 number of petabytes
746
747 =item C<nn>E or C<nn>EB
748
749 number of exabytes
750
751 =item C<nn>sects
752
753 number of 512 byte sectors
754
755 =back
756
757 =head2 time
758
759  time command args...
760
761 Run the command as usual, but print the elapsed time afterwards.  This
762 can be useful for benchmarking operations.
763
764 =head1 COMMANDS
765
766 @ACTIONS@
767
768 =head1 ENVIRONMENT VARIABLES
769
770 =over 4
771
772 =item EDITOR
773
774 The C<edit> command uses C<$EDITOR> as the editor.  If not
775 set, it uses C<vi>.
776
777 =item GUESTFISH_PID
778
779 Used with the I<--remote> option to specify the remote guestfish
780 process to control.  See section
781 L</REMOTE CONTROL GUESTFISH OVER A SOCKET>.
782
783 =item HOME
784
785 If compiled with GNU readline support, then the command history
786 is saved in C<$HOME/.guestfish>
787
788 =item LIBGUESTFS_APPEND
789
790 Pass additional options to the guest kernel.
791
792 =item LIBGUESTFS_DEBUG
793
794 Set C<LIBGUESTFS_DEBUG=1> to enable verbose messages.  This has the
795 same effect as using the B<-v> option.
796
797 =item LIBGUESTFS_MEMSIZE
798
799 Set the memory allocated to the qemu process, in megabytes.  For
800 example:
801
802  LIBGUESTFS_MEMSIZE=700
803
804 =item LIBGUESTFS_PATH
805
806 Set the path that guestfish uses to search for kernel and initrd.img.
807 See the discussion of paths in L<guestfs(3)>.
808
809 =item LIBGUESTFS_QEMU
810
811 Set the default qemu binary that libguestfs uses.  If not set, then
812 the qemu which was found at compile time by the configure script is
813 used.
814
815 =item LIBGUESTFS_TRACE
816
817 Set C<LIBGUESTFS_TRACE=1> to enable command traces.
818
819 =item PAGER
820
821 The C<more> command uses C<$PAGER> as the pager.  If not
822 set, it uses C<more>.
823
824 =item TMPDIR
825
826 Location of temporary directory, defaults to C</tmp>.
827
828 If libguestfs was compiled to use the supermin appliance then each
829 handle will require rather a large amount of space in this directory
830 for short periods of time (~ 80 MB).  You can use C<$TMPDIR> to
831 configure another directory to use in case C</tmp> is not large
832 enough.
833
834 =back
835
836 =head1 EXIT CODE
837
838 guestfish returns 0 if the commands completed without error, or
839 1 if there was an error.
840
841 =head1 SEE ALSO
842
843 L<guestfs(3)>,
844 L<http://libguestfs.org/>,
845 L<virt-cat(1)>,
846 L<virt-df(1)>,
847 L<virt-edit(1)>,
848 L<virt-list-filesystems(1)>,
849 L<virt-list-partitions(1)>,
850 L<virt-ls(1)>,
851 L<virt-make-fs(1)>,
852 L<virt-rescue(1)>,
853 L<virt-resize(1)>,
854 L<virt-tar(1)>,
855 L<virt-win-reg(1)>.
856
857 =head1 AUTHORS
858
859 Richard W.M. Jones (C<rjones at redhat dot com>)
860
861 =head1 COPYRIGHT
862
863 Copyright (C) 2009-2010 Red Hat Inc.
864 L<http://libguestfs.org/>
865
866 This program is free software; you can redistribute it and/or modify
867 it under the terms of the GNU General Public License as published by
868 the Free Software Foundation; either version 2 of the License, or
869 (at your option) any later version.
870
871 This program is distributed in the hope that it will be useful,
872 but WITHOUT ANY WARRANTY; without even the implied warranty of
873 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
874 GNU General Public License for more details.
875
876 You should have received a copy of the GNU General Public License
877 along with this program; if not, write to the Free Software
878 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.