Skip to main content
Cleanup.
Source Link
Kusalananda
  • 338.9k
  • 37
  • 682
  • 991

macOS

TryingI'm trying to do a findfind with a -exec of a command aliased in my .bash_profile on macOS.bash_profile , find shows The find: [alias cmd]: No such file or directory command shows


 
find: [alias cmd]: No such file or directory
e.g. `find ./ -iname *.doc -exec sha256 {} \;`

when I use

find ./ -iname *.doc -exec sha256 {} \;`

where alias sha256="shasum -a 256".


Running the unaliased command works correctly.

Running the unaliased command works correctly.

So is findIs find not supposed to be able to access defined command aliases, or is this a bug in find find?

macOS

Trying to do a find with a -exec of a command aliased in my .bash_profile , find shows find: [alias cmd]: No such file or directory


  e.g. `find ./ -iname *.doc -exec sha256 {} \;`

where alias sha256="shasum -a 256"


Running the unaliased command works correctly.

So is find not supposed to be able to access defined command aliases, or is this a bug in find ?

I'm trying to do a find with a -exec of a command aliased in my .bash_profile on macOS. The find command shows

find: [alias cmd]: No such file or directory

when I use

find ./ -iname *.doc -exec sha256 {} \;`

where alias sha256="shasum -a 256".

Running the unaliased command works correctly.

Is find not supposed to be able to access defined command aliases, or is this a bug in find?

Source Link

find exec does not work with command aliases?

macOS

Trying to do a find with a -exec of a command aliased in my .bash_profile , find shows find: [alias cmd]: No such file or directory


e.g. `find ./ -iname *.doc -exec sha256 {} \;`

where alias sha256="shasum -a 256"


Running the unaliased command works correctly.

So is find not supposed to be able to access defined command aliases, or is this a bug in find ?