2

I would like to find all .mkv files in my download directory and create a hard link to them in my /movies/ directory.

Here’s what I have so far:

for i in `find /download/ -name *.mkv`; do ln "$i" /movies/; done

Which almost works: I receive a bunch of hard links to partial file names. That is, instead of a hard link to say The Best Movie Ever.mkv I receive four hard links, one to The one to Best one to Movie and one to Ever.mkv

Any suggestions?

Giacomo1968
  • 58,727
curios
  • 390

1 Answers1

2

Try this way:

find /download/ -name *.mkv -exec ln {} /movies/ \;
jherran
  • 1,949