3

OK so I am just getting started with the command line stuff so I am guessing this is really a very noob question:

I downloaded the youtube-dl according to this post https://ytdl-org.github.io/youtube-dl/download.html and tried to download a youtube video with this command:

youtube-dl --verbose https://www.youtube.com/watch?v=52bRYf198XY

but it returned

zsh: no matches found: https://www.youtube.com/watch?v=52bRYf198XY

I am on Macbook pro mid-2014 Catalina if it is any help.

7

? appears in the address. Shells use ? as a wildcard for exactly one character in filename generation.

In case there is no matching file in the current working directory, many shells would treat ? literally; your command, although not entirely robust, would probably work in such shell. But not in Zsh, it complains there in no match.

A match could be e.g. https:/www.youtube.com/watchXv=52bRYf198XY (where https: and www.youtube.com are directories; and // became /). If you happened to have an existing file with this path, your command would pass the wrong address to the tool. If there were many matches, it would pass many arguments. This behavior is obviously not what you want. Filename generation makes no sense here.

Single-quote the address to make the shell pass it to the tool verbatim:

youtube-dl --verbose 'https://www.youtube.com/watch?v=52bRYf198XY'

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.