Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 53481
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T17:04:12+00:00 2026-05-10T17:04:12+00:00

I am a heavy command line user and use the find command extensively in

  • 0

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 like this:

$ find -name \*.plist find: illegal option -- n find: illegal option -- a find: illegal option -- m find: illegal option -- e find: *.plist: No such file or directory 

Basically, I forgot to add the little dot:

$ find . -name \*.plist 

Because BSD find requires the path and GNU find doesn’t (it assumes the current directory if you don’t specify one). I use Linux, Mac OS X and Cygwin often all at the same time, so it’s of great benefit to me to have all my tools behave the same. I tried writing a bash find function that added ‘./’ if I forgot, but I failed. Thanks for your help. 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T17:04:13+00:00Added an answer on May 10, 2026 at 5:04 pm

    If you can’t discipline yourself to use find ‘correctly’, then why not install GNU find (from findutils) in a directory on your PATH ahead of the system find command.

    I used to have my own private variant of cp that would copy files to the current directory if the last item in the list was not a directory. I kept that in my personal bin directory for many years – but eventually removed it because I no longer used the functionality. (My ‘cp.sh’ was written in 1987 and edited twice, in 1990 and 1997, as part of changes to version control system notations. I think I removed it around 1998. The primary problem with the script is that cp file1 file2 is ambiguous between copying a file over another and copying two files to the current directory.)

    Consider writing your own wrapper to find:

    #!/bin/sh [ ! -d '$1' ] && set -- . '$@' exec /usr/bin/find '$@' 

    The second line says ‘if argument 1 is not a directory, then adjust the command line arguments to include dot ahead of the rest of the command. That will be confusing if you ever type:

    ~/bin/find /non-existent/directory -name '*.plist' -print 

    because the non-existent directory isn’t a directory and the script will add dot to the command line — the sort of reason that I stopped using my private cp command.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The book I've been reading about Django mandates heavy usage of a command line
I use pdftk to compress a pdf using the following command line pdftk file1.pdf
Heavy emphasis on simple. I've never made an installer and I'd rather not have
I've been making heavy use of the interactive 3D controls, made by some guys
I'm making pretty heavy use of JSON parsing in an app I'm writing. Most
We make heavy use of multicasting messaging across many Linux servers on a LAN.
I'm making pretty heavy use of reflection in my current project to greatly simplify
I know Java ok, but not heavy. I am trying to get SchemaSpy working
My iPhone game makes heavy use of the OpenGL ES 2.0 API, and it
If we have really heavy-processes system where process spawning is made for some kind

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.