I use a command like
btrfs restore -iv /dev/sdc1 /RESTORED
estimated time of running it is few days
In every hour of running I see a lot of prompts like:
We seem to be looping a lot on /path/to/some/file, do you want to keep going on?
(y/N/a)
I'd like to say N to all remaining prompts, but there is no such option
(according to man btrfs-restore and btrfs )
I think I need this:
yes N | btrfs restore -iv /dev/sdc1 /RESTORED (which will start restore again)
Is any way to pause a running task (not cancel) and then resume within a pipe like
ctrl+Z + $ yes N | fg
(the above return fg no job control). fg here is only to show what I mean.
xdotoolorxvkbdto simulate repeatedly pressing N. A script doing that could be launched with a shortcut key when the command is running and starts to ask confirmations. – vanadium Jun 27 '21 at 14:28expect. – muru Jun 27 '21 at 15:17