1

I want to force myself to use folder/file names without spaces etc. so I'm 100% certain I can open and run them from the command line.

Some terminal apps which I use frequently hava a hard time recognisizing filenames that have spaces in them, and I want to prevent having to type \ every time.

Is there a way of forcing this (perhaps formatting my hdd in to a different file system)?

6

Unfortunately, you just have to remember to do it each time you make a file or directory. There's no way you can do this via software tools or by formatting to a particular file system. After the fact you can use software to convert spaces to '.' or '-' however.

Obviously what you describe is an excellent idea and good practice when working in a *nix environment. You'll probably find that the more time you spend in the Terminal, the more inclined you'll be to create short, non-spaced file names. Unfortunately Apple themselves make your task an impossible one in that they often use multi-word file or directory names.

As to the first part of your question: You can be sure that you'll always be able to manipulate files in the Terminal, even if they contain many spaces, etc. It's just a case of 'escaping' the spaces by typing a '\ ' where the space would be, as you point out.

Tab-completion can be a real time saver here, but it's generally better to avoid the problem in the first place.

  • Okay, too bad.. was just wondering – romeovs Apr 27 '11 at 19:55
3

You can put the whole path in singlequotes:

$ cd '/User Guides And Information/Welcome to Snow Leopard.app/'

Tab-completion even works properly inside a quoted path string.

But as @boehj says, there's no way to make spaces into non-troublemakers on an OS leve.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .