Tip: easier file upload in guestfish

In guestfish ≥ 1.3.5 you can use a syntax similar to shell heredocs to upload an immediate document. Just replace the source filename in the guestfish upload command with -<<END [dash, less-than, less-than] where “END” is any unique marker string:

><fs> upload -<<__end__ /hello
this  
is a
simple
hello
world
example
__end__
><fs> cat /hello
this
is a
simple
hello
world
example

There is more on this in the guestfish manpage.

1 Comment

Filed under Uncategorized

One response to “Tip: easier file upload in guestfish

  1. Pingback: Tip: upload base64-encoded binary files in guestfish « Richard WM Jones

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s