git.annexia.org
/
libguestfs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
New tool: virt-edit
[libguestfs.git]
/
cat
/
virt-cat.pl
diff --git
a/cat/virt-cat.pl
b/cat/virt-cat.pl
index
6a50280
..
329ba6e
100755
(executable)
--- a/
cat/virt-cat.pl
+++ b/
cat/virt-cat.pl
@@
-25,9
+25,6
@@
use Sys::Guestfs::Lib qw(open_guest get_partitions resolve_windows_path
inspect_operating_systems mount_operating_system);
use Pod::Usage;
use Getopt::Long;
inspect_operating_systems mount_operating_system);
use Pod::Usage;
use Getopt::Long;
-use Data::Dumper;
-use File::Temp qw/tempdir/;
-use XML::Writer;
use Locale::TextDomain 'libguestfs';
=encoding utf8
use Locale::TextDomain 'libguestfs';
=encoding utf8
@@
-47,8
+44,9
@@
virt-cat - Display a file in a virtual machine
C<virt-cat> is a command line tool to display the contents of C<file>
where C<file> exists in the named virtual machine (or disk image).
C<virt-cat> is a command line tool to display the contents of C<file>
where C<file> exists in the named virtual machine (or disk image).
-C<virt-cat> can be used to quickly view a single file. For more
-complex cases you should look at the L<guestfish(1)> tool.
+C<virt-cat> can be used to quickly view a single file. To edit a
+file, use C<virt-edit>. For more complex cases you should look at the
+L<guestfish(1)> tool.
=head1 EXAMPLES
=head1 EXAMPLES
@@
-61,6
+59,10
@@
List syslog messages from a VM:
virt-cat mydomain /var/log/messages | tail
virt-cat mydomain /var/log/messages | tail
+Find out what DHCP IP address a VM acquired:
+
+ virt-cat mydomain /var/log/messages | grep 'dhclient: bound to' | tail
+
Find out what packages were recently installed:
virt-cat mydomain /var/log/yum.log | tail
Find out what packages were recently installed:
virt-cat mydomain /var/log/yum.log | tail
@@
-112,8
+114,8
@@
at all.
=cut
GetOptions ("help|?" => \$help,
=cut
GetOptions ("help|?" => \$help,
- "version" => \$version,
- "connect|c=s" => \$uri,
+
"version" => \$version,
+
"connect|c=s" => \$uri,
) or pod2usage (2);
pod2usage (1) if $help;
if ($version) {
) or pod2usage (2);
pod2usage (1) if $help;
if ($version) {
@@
-136,7
+138,6
@@
if ($uri) {
}
$g->launch ();
}
$g->launch ();
-$g->wait_ready ();
# List of possible filesystems.
my @partitions = get_partitions ($g);
# List of possible filesystems.
my @partitions = get_partitions ($g);
@@
-164,6
+165,7
@@
print $g->download($filename, "/dev/stdout");
L<guestfs(3)>,
L<guestfish(1)>,
L<guestfs(3)>,
L<guestfish(1)>,
+L<virt-edit(1)>,
L<Sys::Guestfs(3)>,
L<Sys::Guestfs::Lib(3)>,
L<Sys::Virt(3)>,
L<Sys::Guestfs(3)>,
L<Sys::Guestfs::Lib(3)>,
L<Sys::Virt(3)>,