I have a file structure like this:
experiment/
├── foo.txt
├── source-foo.txt
└── subdir
└── foo.txt
I want to take the file source-foo.txt and replace the other foos with it. Just like doing cp source-foo.txt foo.txt and cp source-foo.txt subdir/foo.txt both at once. I was thinking I could use find for this purpose, something like:
cp source-foo.txt $(find . -iname foo.txt)
But thet retus an error:
cp: target „foo.txt“ is not a directory
How do I make this work?
برچسب:
نویسنده: استخدام کار