Mac file names can include characters that are illegal on other systems. You can even create file names that can cause problems for other Mac programs. There's an old saying that applies here: just because you can do something doesn't mean that you should.
It's very simple to avoid problems. Stick to the alphabet and "-" and "_" only. There are a few other characters you could use, but why bother to remember them? The alphabet and the dash or underscore are enough: you don't need any more.
Notice that I did not include the space character. Don't use filenames like "picture of Mom's dog". Make it "Picture-of-moms-dog". Better yet, make it "picture-of-moms-dog" (because case matters on some file systems) or if you really need compatibility, shorten it to "momsdog" (some old systems can only do eight character filenames and three character extensions).
You might say "I'll never have to worry about any other OS or file system" but spaces and other punctuation characters are difficult to work with at the shell command line also, and there may come a day when you will need or want to use command line tools. Don't make that painful by having complex file names. Keep it simple now, and it always will be.
By the way, if this is a filename for a web page, see http://aplawrence.com/foo-web/dash-vs-underscore.html">dashes vs. underscores in web page filenames at Foo-web.com.
More Articles by Tony Lawrence - Find me on Google+
Have you tried Searching this site?
Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates
This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more. We appreciate comments and article submissions.
Many of the products and books I review are things I purchased for my own use. Some were given to me specifically for the purpose of reviewing them. I resell or can earn commissions from the sale of some of these items. Links within these pages may be affiliate links that pay me for referring you to them. That's mostly insignificant amounts of money; whenever it is not I have made my relationship plain. I also may own stock in companies mentioned here. If you have any question, please do feel free to contact me.
Specific links that take you to pages that allow you to purchase the item I reviewed are very likely to pay me a commission. Many of the books I review were given to me by the publishers specifically for the purpose of writing a review. These gifts and referral fees do not affect my opinions; I often give bad reviews anyway.
We use Google third-party advertising companies to serve ads when you visit our website. These companies may use information (not including your name, address, email address, or telephone number) about your visits to this and other websites in order to provide advertisements about goods and services of interest to you. If you would like more information about this practice and to know your choices about not having this information used by these companies, click here.
Click here to add your comments
Don't miss responses! Subscribe to Comments by RSS or by Email
Click here to add your comments
If you want a picture to show with your comment, go get a Gravatar