find command

I want to configure my linux account so that the command  'fnd argument' is equivalent to:           'find / -name argument 2> /dev/null'    I know I should put it in .bashrc as an alias or a user-defined function, but I'm having a hard time making it work.  Does anybody know the proper syntax for doing this?  
Who is Participating?
jlevieConnect With a Mentor Commented:

fnd () { find / -name $1 2>/dev/null; }

To have the command available each time you log in you'll want to include that function in your .bashrc file.
Or, if you don't want to blow up your environment with
too many functions, you may create a script 'find' e.g. in
$HOME/bin like:

  /usr/bin/find / -name $1 2>/dev/null

and make that directory being the first one in your PATH --
at the end of $HOME/.bashrc

  export PATH=$HOME/bin:$PATH

Hope it helps
alphaomega232Author Commented:
Thanks to both of you
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.