I have a question about unix command line. I have many files like these:
/f/f1/file.txt
/f/f2/file.txt
/f/f3/file.txt
and so on.
I had like copy all file.txt with their father folder in another folder g like:
/g/f1/file.txt
/g/f2/file.txt
/g/f3/file.txt
I can’t copy all content of folder f because in each sub-folder f1, f2, ... I have many other files that I don’t want copy.
How could I do this with the command line? Eventually using a bash script?
Manual for
cpshows this option –So if you are on
bash v4you can do something like this –