I'm trying to download latest ffmpeg from here and extract the ffmpeg file to /usr/bin but no matter what I do I can't make the file go there!

My command to download and extract the file

wget -q https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz -P /tmp

tar -xf /tmp/ffmpeg-release-amd64-static.tar.xz  --no-anchored 'ffmpeg' -C /usr/bin/ --strip-components=1

Obs: I want only the file there, not folders!

What am I doing wrong?

  • 1
    Have you tried placing -C /usr/bin/ before the file argument 'ffmpeg'? – steeldriver Apr 2 at 11:22
  • @steeldriver that works! I'm so dumb :( should I delete this question? – Freedo Apr 2 at 11:26
  • It's a valid question I think (the order dependence of the -C switch is documented, but perhaps not familiar to many) – steeldriver Apr 2 at 11:30

As noted in man tar, the -C option only affects operations that come after it:

-C, --directory=DIR
        Change  to DIR before performing any operations.  This option is
       order-sensitive, i.e. it affects all options that follow.

So for example moving the 'ffmpeg' file argument after the -C should work:

tar -xf /tmp/ffmpeg-release-amd64-static.tar.xz  --no-anchored --strip-components=1 -C /usr/bin/ 'ffmpeg' 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.