virt-ls

Langue: en

Version: 2010-09-16 (fedora - 01/12/10)

Section: 1 (Commandes utilisateur)

NAME

virt-ls - List files in a virtual machine

SYNOPSIS

  virt-ls [--options] domname directory
 
  virt-ls [--options] disk.img [disk.img ...] directory
 
 

DESCRIPTION

"virt-ls" is a command line tool to list the names of files in a directory inside a virtual machine or disk image.

"virt-ls" is just a simple wrapper around libguestfs(3) functionality. For more complex cases you should look at the guestfish(1) tool.

"virt-ls" can be used in one of three modes: simple, long and recursive. A simple listing is like the ordinary ls(1) command:

  $ virt-ls myguest /
  bin
  boot
  [etc.]
 
 

With the "-l" ("--long") option, "virt-ls" shows more detail:

  $ virt-ls -l myguest /
  total 204
  dr-xr-xr-x.   2 root root   4096 2009-08-25 19:06 bin
  dr-xr-xr-x.   5 root root   3072 2009-08-25 19:06 boot
  [etc.]
 
 

With the "-R" ("--recursive") option, "virt-ls" lists the names of files and directories recursively:

  $ virt-ls -R myguest /tmp
  foo
  foo/bar
  [etc.]
 
 

You cannot combine these options. To do more complicated things, use guestfish(1).

OPTIONS

--help
Display brief help.
--version
Display version number and exit.
--connect URI | -c URI
If using libvirt, connect to the given URI. If omitted, then we connect to the default libvirt hypervisor.

If you specify guest block devices directly, then libvirt is not used at all.

-l | --long
-R | --recursive
Select the mode. With neither of these options, "virt-ls" produces a simple, flat list of the files in the named directory.

"virt-ls -l" produces a ``long listing'', which shows more detail (just like the plain "ls -l" command).

"virt-ls -R" produces a recursive list of files starting at the named directory. See the documentation for the "guestfs_find" command guestfs(3) for precise details.

You cannot combine these options.

SEE ALSO

guestfs(3), guestfish(1), virt-cat(1), virt-tar(1), Sys::Guestfs(3), Sys::Guestfs::Lib(3), Sys::Virt(3), <http://libguestfs.org/>.

AUTHOR

Richard W.M. Jones <http://people.redhat.com/~rjones/> Copyright (C) 2009 Red Hat Inc.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.