If you’re new to the Mac command line you may have come across a situation where you’re trying to interact with a file that has spaces in the name, for example “This File.txt” but as you probably discovered, you can’t simply type the file name if there are spaces within the file name, or the command to move, rename, copy, or otherwise interact with the file will fail to execute.
There are a few ways to interact with files from Terminal that have spaces in the file names, but one is arguably easier to remember and use than the other.
We’re focusing on the Mac here, but this works with basically any unix command line you’ll encounter, whether it’s MacOS, Linux, Windows WSL, etc.