Create qvm-copy-to-dom0

Copy a file from an AppVM to dom0
This commit is contained in:
[799] 2018-03-12 22:42:17 +01:00 committed by GitHub
parent 54e2de79be
commit 9379a4a48f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

16
scripts/qvm-copy-to-dom0 Normal file
View File

@ -0,0 +1,16 @@
#!/bin/bash
# qvm-copy-to-dom0
# Copy a file from an AppVM to dom0
# qvm-copy-to-dom0 <AppVM> <Source in AppVM> <Destination in dom0>
# command line parameters
AppVM=$1 # must be present
Source=$2 # must be present
Destination=$3 # optionally
# if no Destination given on commandline use ~/QubesIncoming
if [ -z "$3" ];then mkdir -p ~/QubesIncoming && \
Destination=~/QubesIncoming/$(basename $Source); fi
# copy file from AppVM to dom0
qvm-run --pass-io $AppVM "cat $Source" > $Destination