Meng,

Unless you want to edit the source C code and recompile, there doesn't
appear to be a way to accomplish that on the native command. An alternative
would be to create a shell or python script that will ask about each file
matching the input, and if Enter or y/Y is hit, will run the rm command or
a python equivalent, otherwise it will move to the next file. I might be
able to whip up either if you are unfamiliar with shell or python scripts.

On Tue, Aug 22, 2017 at 1:17 PM <[email protected]> wrote:

> hi, I am on ubuntu 16.04 with GNU bash 4.3.48, is there anyway to have 'rm
> -i' (and similarly for 'mv -i' and 'cp -i') to accept a simple Enter press
> as a yes confirmation? I don't want to type that extra 'y' every time.
> ubuntu apt install for example is able to admit a plain Enter key as a
> positive answer, which works really nice. Thanks.
>
>
>
> I have tried google this, but not much successful, partly because it is
> hard to phrase it without getting into other similar but unrelated searches.
>
> I understand I can go mess up GNU coreutils code or write up my own bash
> rm function, but these are all heavy duty to me. I am looking for some
> light settings, such as flipping some bash flags to make this happen.
>
> I am aware of rm -I which sort of alleviates the problem, but that's not a
> general mechanism, for example, mv/cp doesn't have -I option as far as I
> can tell.
>
> --
> --
> You received this message because you are subscribed to the Linux Users
> Group.
> To post a message, send email to [email protected]
> To unsubscribe, send email to [email protected]
> For more options, visit our group at
> http://groups.google.com/group/linuxusersgroup
> References can be found at: http://goo.gl/anqri
> Please remember to abide by our list rules (http://tinyurl.com/LUG-Rules)
> ---
> You received this message because you are subscribed to the Google Groups
> "Linux Users Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>
-- 

Jeremiah Bess

-- 
-- 
You received this message because you are subscribed to the Linux Users Group.
To post a message, send email to [email protected]
To unsubscribe, send email to [email protected]
For more options, visit our group at 
http://groups.google.com/group/linuxusersgroup
References can be found at: http://goo.gl/anqri
Please remember to abide by our list rules (http://tinyurl.com/LUG-Rules)
--- 
You received this message because you are subscribed to the Google Groups 
"Linux Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to