1

I am trying to find all files named doc.py in one of my virtualevns (called data_science), which are all in hidden directory .virtualenvs under /Users/adni and so I go:

mdfind -onlyin data_science  -name doc.py 

it returns NOTHING.

One hint is thtat is not working recursivly or has some problems with hidden dirs. If it matters I run it in zsh shell.

1 Answer 1

0

I think Spotlight doesn't index files or directories whose name starts with a period, or at least they are not shown by mdfind.

I couldn't find any documentation about it, but for example mdfind kMDItemFSName=.bash_history doesn't find ~/.bash_history either. If you run sudo opensnoop in one shell and mkdir .a;touch .a/{1..1000};mdimport .a in another shell, you'll see that files in .a are not opened, but if you run mkdir a;touch a/{1..1000};mdimport a, files in a are opened.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .