1

I'm using the following to convert a video library from x264 to x265. But I can't stop it without doing a Ctrl-C on the bash script whilst it's working.

find /mnt/local/int001/media/TV/ \ \( -name '*[xXhH]264*.mkv' -o -name '*[xXhH].264*.mkv \) \ ! -name '*[xX]265*' -type f -exec /usr/local/bin/ConvertTo265.sh {} + 

But then the find process keeps spitting out results and the script re-triggers. How can I implement this so I can stop it when required. I have several months of conversion ahead and need to be able to stop it for maintenance etc.

3
  • 1
    You are missing a single quote in '*[xXhH].264*.mkv \) Commented Dec 1, 2019 at 0:47
  • What is the problem? Doesn't Ctrl+C stop it? What's missing? Commented Dec 1, 2019 at 18:36
  • As per the answer below, it only stops the bash script. Find continues to pipe more results, which results in the script being re triggered. Commented Dec 1, 2019 at 19:16

1 Answer 1

3

Presumably the Ctrl-C is only killing the active conversion sub process(es). You could try using Ctrl-Z to suspend it, then kill off the suspended process with kill %1.

Alternatively spin up another terminal and kill the find process from there.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.