[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: burn iso to usb



On Mon, Aug 02, 2021 at 03:44:03PM -0400, Greg Wooledge wrote:
> On Mon, Aug 02, 2021 at 10:02:18PM +0300, Gunnar Gervin wrote:
> > pv -parle </path/to/file.iso >/dev/sdX
> > would rather be:
> > sudo pv -parle </path/to/debian-live-10.10.0-amd64-gnome.iso>/dev/sdb
> 
> No, that won't work.
> 
> https://mywiki.wooledge.org/BashPitfalls#pf53
> 
> If you want to use redirections with sudo, you either need to wrap
> things in "sh -c" a lot, or else get a full interactive shell first
> (sudo -s), and *then* run your commands with redirections.

Another nice use for 'dd', btw :-)

  pv -parle < ... | sudo dd of=/dev/sdb <other nice dd options>

One charming property of that is that only the 'dd' runs as root.

(the usual solution is to use 'tee', but then you have to get rid
of stdout).

Cheers
 - t

Attachment: signature.asc
Description: Digital signature


Reply to: