Aliasing grep in find’s -exec option

I have these aliases in my ~/.bashrc

alias grep='grep --color=auto -H'
alias fgrep='fgrep --color=auto -H'
alias egrep='egrep --color=auto -H'

but they have no effect when I run find ... -exec grep ..., and I always have to provide those options manually.

Is there a way to tell find to rely on aliases in the -exec option’s arguments? I’m thinking of configuration files, rather than other aliases.

Would it be unsafe in some way?

Go to Source
Author: Enrico Maria De Angelis

Where are default aliases defined

I’ve got a fresh install of CentOS 8 (minimal ISO). I notice that, despite none being listed in either .bashrc or .bash_profile, a bunch of aliases are defined by default in bash. For example,

alias cp='cp -i'
alias egrep='egrep --color=auto'

Many of these aliases I’d like to keep. However, where can I find/edit the sources of those definitions?

Go to Source
Author: Daniel Walker