There is a set of python files in a folder. One file includes a class definition, for instance
Class DataGen:
How can I know which python file in this folder use this Class? Are there any linux command that can allows me do this kind of search?
There is a set of python files in a folder. One file includes a class definition, for instance
Class DataGen:
How can I know which python file in this folder use this Class? Are there any linux command that can allows me do this kind of search?
Try grep -R DataGen . to recursively search your working directory for files that contain "DataGen".
grep -R with *.py it will only recurse into directories that are named something that matches *.py, directories with a .py "extension", which is unlikely to do what you want... Instead, specify the current directory instead: grep -R DataGen ., that should be more helpful...