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

  • Home
  • SEARCH
  • 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

Ask A Question

Stats

  • Questions 104k
  • Answers 104k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You should be able to check for the 500 status… May 11, 2026 at 8:32 pm
  • Editorial Team
    Editorial Team added an answer $date = date('m/d/Y'); see http://en.php.net/manual/en/function.date.php for the syntax of date() May 11, 2026 at 8:32 pm
  • Editorial Team
    Editorial Team added an answer You can try SELECT * into SomeTable FROM OPENROWSET('MSDASQL', 'Driver=Microsoft… May 11, 2026 at 8:32 pm

Related Questions

I wrote some smart generic counters and managers for my models (to avoid select
Today I'm on an asking spree :P Anyhow... Right now I am developing a
I am developing a c# GUI and was wondering if there were any (preferably
I am developing a product with heavy 3D graphics computations, to a large extent

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.