I have got a rather large file system, and let's say that I want to find all the files and directories in a certain area of my file system which contain the String ActionListeener, and to do this I want to use tree. So if I do:
tree ~/ | grep ActionListeener
The result will be:
│ │ │ └── ActionListeener.class
│ │ └── ActionListeener.java
So I now know that these files do exist somewhere a little deeper into my file system, but I have no idea about which folder contains the sub-folder, which contains the sub-sub-folder, and so on, to the files.
So really my question is, how can I get the tree command (by maybe piping the output to something else) to show me the folder and path which leads me to those particular files which contain that String?
OS Information:
Description: Ubuntu 15.04
Release: 15.04
Package Information:
tree:
Installed: 1.7.0-3
Candidate: 1.7.0-3
Version table:
*** 1.7.0-3 0
500 http://gb.archive.ubuntu.com/ubuntu/ vivid/universe amd64 Packages
100 /var/lib/dpkg/status