a basic program to search for files by their extension and move them to a new location, for example:
search for files by extension "mkv" and move them to the folder / x
user@user$ find /home/example1 -type f -name '*.mkv' -exec [mv -f example/directory] \;
but when I insert more than one line into the same script, the system says that it does not understand the "-exec" function
find: missing argument to '-exec'
to run the script I used a
sh programa
script example in script:
find /carpeta1/carpeta -type f -name '*.mkv' -exec [mv -f /carpeta35] \;
find /carpeta3/carpeta -type f -name '*.avi' -exec [mv -f /cartepa22] \;