0
I have a directory structure that contains a number of files which are named the same as in: dir1/test dir2/test dir3/test I want to find each test file and copy it to another directory with a unique (arbitrary) file name so I can analyze the data they contain. There could be a large number of these similarly named files contained several layers deep in the directory structure. I can use find to locate the files but the renaming (using find) is alluding me. Can anyone provide guidance on this issue?
Can I integrate your answer into a find command? As in, find . -name FNAME -exec bash -c 'for f in {} do; cp {} "$f" "/tmp/somedir/${f////.}" ; done ;. I tried it and received modifier failed. Should this work? – Charles – 2015-07-09T16:57:13.903