How can I make the “find” Command on OS X default to the current directory?

后端 未结 7 1850
清酒与你
清酒与你 2021-02-13 07:21

I am a heavy command line user and use the find command extensively in my build system scripts. However on Mac OS X when I am not concentrating I often get output l

7条回答
  •  清歌不尽
    2021-02-13 07:44

    If you must call it 'find', then you want:

    alias find=/usr/bin/find\ .
    

    in your .profile or .bash_profile or …. Substitute the real path (if not /usr/bin/find) on your Mac OSX. Enter the full path to avoid cycles (bash normally would interpret alias find=find without issues, but better be sure).

    But you better not name the alias find (findl, myfind etc), because it will become a habit and trouble for you if you try it on another system.

提交回复
热议问题