find command in terminal -- listing files twice

Joined
Feb 3, 2008
Messages
304
Reaction score
5
Points
18
I noticed the other day that after i used the find command to search for some files, the computer listed them twice -- first with just the names of the files (meaning ./(then the individual file names), then with the directory name, followed by the file names (directory name/file name). I was already in the desired directory, and I don't think this has ever happened before. Can someone tell me why it does this and how to fix it? Is there something wrong?
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
What does your find command look like?
 
OP
S
Joined
Feb 3, 2008
Messages
304
Reaction score
5
Points
18
Sorry -- here it is :

find . -iname "*(text to search for)*" -type f

then, as I said, it gives ./(Filenames) then ./(directory name)/(filenames)

and, just now, if I do it from my home directory, I get ./directory name./ file names, then ./directory name/directory name/filenames

Just the other day as well I reinstalled Snow Leopard after I thought I had possibly deleted some necessary files, if that helps.
 
OP
S
Joined
Feb 3, 2008
Messages
304
Reaction score
5
Points
18
Never mind -- I am such an idiot -- I didn't notice that I had place a copy of the subdirectory from my flash drive inside the subdirectory
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top