unix - appening recursive command for a Linux STDIN -
when moving / copying contents 1 folder another. asked if want overwrite files sharing identical names. in example:
[root@public/]# sudo mv * /var/www/public/html/
for example, if public
has 100 files exist in html
ask if want overwrite each file name 100 time. there way append y
command?
i linux newbie. know can stdin, stdout , stderr. though append doing < "echo y";
ain't working.
basically can use program yes
such purposes:
yes | mv ...
yes
called without arguments repeats string "y" forever if pass argument ouput argument. leads nice call
yes no | program
which can used repeatedly "no" :)
however, in case mv
has option -f
wich suppress questions , enforce actions. use care questions meant prevent data loss.
Comments
Post a Comment