-2

Error when running this command, i think the command is clear to get the idea.

cp file.txt /folder/*/*/*/file.txt

MoJo
  • 44
  • 7
  • 1
    read the [man page](http://man7.org/linux/man-pages/man1/cp.1.html). `cp` does not have that feature. – Blorgbeard Sep 20 '15 at 22:56
  • 1
    `cp` can't do that. And this question should be on [unix.se]. – Roman Sep 20 '15 at 22:58
  • You should include the text of the error message. Also, you should include a description of what you are trying to accomplish. "i think the command is clear" is not necessarily enough. – Brent Bradburn Sep 20 '15 at 23:50

1 Answers1

2

You need a loop to do that:

for dir in /folder/*/*/*/; do cp file.txt "$dir"; done
John1024
  • 109,961
  • 14
  • 137
  • 171