diff --git a/examples/guestfs-recipes.pod b/examples/guestfs-recipes.pod index 82fc86e06..dc9b99a70 100644 --- a/examples/guestfs-recipes.pod +++ b/examples/guestfs-recipes.pod @@ -68,6 +68,24 @@ images. The useful guide below explains the options available. L +=head1 Delete a file (or other simple file operations) + +Use guestfish. To delete a file: + + guestfish -a disk.img -i rm /file/to/delete + +To touch a file (bring it up to date or create it): + + guestfish -a disk.img -i touch /file/to/touch + +To stat a file. Since this is a read-only operation, we can make it +safer by adding the I<--ro> flag. + + guestfish --ro -a disk.img -i stat /file/to/stat + +There are dozens of these commands. See L or the output +of C + =head1 Dump raw filesystem content from inside a disk image or VM You can use the L C command to extract the raw