Skip to main content

 

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.

 

★★ Full Article ★★

Good article. Worth noting that if you are using the terminal app and therefore have the Finder GUI app in the background, you can drag a file or folder onto the terminal window and it will add the full path to that file/folder to save you having to type anything. 


Handy tip! Thank you and shared with the team


This is a great tip. Now, can you take it a step further and discuss how to edit names that end up with special characters in the name?


Reply