On 1 April 2014 16:45, Markus Schönhaber <fedora-users@xxxxxxxxxxxxxxxxxxxxx> wrote: > 01.04.2014 17:33, Chris Adams: > >> Once upon a time, Mark Haney <mhaney@xxxxxxxxxxxxxx> said: >>> sudo xzcat Fedora-Minimal-armhfp-20-1-sda.raw.xz > /dev/sdb >>> >>> I would get a 'Permission denied' error. >> >> That's because the "> /dev/sdb" was parsed and handled by your user >> shell (redirection is handled by the shell before running the command). >> sudo only got "xzcat Fedora-Minimal-armhfp-20-1-sda.raw.xz" as >> arguments. You should be able to quote what you want actually passed to >> sudo: >> >> sudo "xzcat Fedora-Minimal-armhfp-20-1-sda.raw.xz > /dev/sdb" > > ... which would give a "command not found" error. > > Something like > sudo bash -c "xzcat Fedora-Minimal-armhfp-20-1-sda.raw.xz > /dev/sdb" > should work though, since the shell which is started with elevated > rights is doing the output redirection now. > xzcat Fedora-Minimal-armhfp-20-1-sda.raw.xz | sudo dd of=/dev/sdb Will also work, using sudo to grant write permissions, but not read permissions. Less flexible than specifying a command to a sudoed shell command, but also more granular control (if you can call dd as root granular). -- imalone http://ibmalone.blogspot.co.uk -- users mailing list users@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org