I need to find the folder names along with the file names which has my string in their contents. I am in this directory "
/data/queue/data" and I have lot of folders in the same directory and inside those each folders, I have various files.
Below are the folders in this directory "
/data/queue/data" and each of those folders has various files in it.
david@machineA:/data/queue/data$ ls -lrth drwxr-xr-x 2 david david 12K Apr 11 18:58 1428800400 drwxr-xr-x 2 david david 12K Apr 11 19:58 1428804000 drwxr-xr-x 2 david david 12K Apr 11 20:58 1428807600
I want to run a command from this directory only - "
/data/queue/data" but it should only find the files inside folder whose timestamp is from
April 13th 3 AM to April 13th 9 AM.
Below is the command I have which will recursively find the files inside all the folders but how should I make sure that it should only find files from
April 13th 3 AM to April 13th 9 AM folders?
david@machineA:/data/queue/data$ grep -rl "pcV6URY" /data/queue/data
What is the best way to do this?