Reputation: 1949
A few days ago I was reading about the Linux find
tool and based on that I issued the following command to see if I have the Python.h
file:
find . 'Python.h'
The problem is that all files in current dir and subdirs are returned. Shouldn't I get what I'm looking for?
Upvotes: 1
Views: 887
Reputation: 18865
Use -name switch:
find . -name 'Python.h'
Otherwise it takes the name as location to look at.
Upvotes: 1
Reputation:
You left out the parameter specifier -name
:
find ./ -name 'Python.h'
find
will recurse through all directories in the current directory. If you just want to see whether you have a file in the current directory, use ls
:
ls Python.h
Upvotes: 3