I am trying to find all my .txt and .csv files in my backup (Apple's time machine).The structure of the backup directories is like this:/machine name/date/Macintosh HD/ The above contains all the files from my machine on that day. I have many of those directories as the backup drive contains stuff from multiple machines, last 3 years.What I am interested in is to find my text and CSV files so for example file: /mac1/2014-08-31-173253/Macintosh HD/Users/me/Documents/work/file1.txtSo I need to find all .txt files which have somewhere on their path /Users/me
How to find a file with partially specified path?
bash;find;darwin
You could use find, provided it's available:$ find /mac1/2014-08-31-173253/Macintosh HD -wholename */Users/me/*.txt -or -wholename */Users/me/*.csvThis will search /mac1/2014-08-31-173253/Macintosh HD for files containing the pattern */Users/me/*.(txt|csv) in their paths.