Escaping characters in folder nme in Terminal

keyboardterminal

I've been learning about Terminal recently, and although I've learnt about the backslash, double quotes, single quote etc. for escaping characters, how would I create a folder with this name (it's on a VM in Parallels so if I screw anything up, it's not going to affect my main Mac OS X install).

I'm using Mac OS Sierra 10.12.2 in Parallels, same as my desktop, but that's a "sandbox" machine for testing software etc. without affecting the regular Mac – if it's sluggish or software crashes I'm not losing important files and can always reset it – theoretically. (The VM isn't used for writing this though… I'm using the regular Mac now. Probably not relevant, but I'm new-ish to Parallels, but that's for another question.).

I tried this command to create a directory with a web address as the name:

mkdir 'http://www.mysite.net' 

but got this error:

mkdir: http:: No such file or directory

How could I escape the : and // so a folder looks like a web URL even though it's not (this is for testing purposes, nothing more, as it's on a VM). How could i emulate those characters in a folder name?

If anyone could help I'd appreciate this!

Best Answer

The problem is you can't use / in the name of a directory. The / is reserved to separate directories. Maybe you could replace the // with different characters?