10 replies
Sign in or join Beachball Help to reply.
- 0
orangekay ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
Because then they don't have to quote their paths on the command line. Failure to do this is what caused one of the early iTunes installers to erase entire hard drives just because they had a space in their name.
- 0
Tom Gewecke ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
A lot of people I have worked with are keen on using underscores in folder and file names? Why is this?
You mean instead of spaces, right? If so, the reason might be to avoid situations like urls where spaces get turned into %20. Or problems if a file name comes at the end of a line of text. Or apps or search engines that don't like spaces in filenames. I think some recommend hyphens as better than underscores.
- 0
scaredpoet ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
Back in the day, there were concerns about using "special characters" in filenames, because not all Operating Systems treat them the same way. Things like spaces, extra periods and commas had the potential for causing problems whenever a file was transfered from one OS to another (say, from Mac OS X to Windows). Even now, putting a space in the name of a file that is destined to be on a website URL isn't a good idea.
And so, some people will put underscores (_) or hyphens β instead of spaces in filenames to help avoid these issues.
- 0
Community User ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
You still don't need to quote spaces. If I have a file name *Test File*, in Terminal, I can use *open "Test File* o *open Test File*. They both work.
- 0
orangekay ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
You have to escape them one way or another and it's easy to forget to do so when writing complex scripts.
- 0
nerowolfe ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
scaredpoet wrote:
And so, some people will put underscores (_) or hyphens β instead of spaces in filenames to help avoid these issues.And on these boards one needs to escape a hyphen thusly: (- ) or ( -) or you get this: β π
Yes most computer systems regard a space as a separator and most likely early on, the underscore was one of the few non-standard "characters" that were useable to create something that looks like a space but is not. Hyphens are not as good since they also occur in normal words and are used by the computer to flag something special coming up. The underscore was innocuous and spacey looking.
We have not even touched upon the use of Caps inside words which began in the programming world and has now spread to the rest of the world. - 0
Francine Schwieder ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
We have not even touched upon the use of Caps inside words
Yep, that's what I do. Instead of naming a jpeg something like this: red rose.jpg, I call it RedRose.jpg. And that's because I use the Terminal a fair amount and don't want to have to specify the file by either "red rose.jpg" or red rose.jpg. The problem is that in UNIX CLI the space means something to the shell, so you have to escape it one way or the other so that the shell "sees" the space as part of the file or folder name rather than as a separator in the command.
Furthermore, a huge portion of the Internet is served up from UNIX based servers, and as an old fashioned web master, writing html by hand, it was just easier to have all my files web safe by not having spaces in their names, so even before OS X came along with the option to access its UNIX heart with Terminal I had already gotten in the habit of eschewing spaces in file names. I suspect that is true of lots of people.
Francine - 0
nerowolfe ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
Early versions of MS OSs did not allow the use of spaces in file names. Now they do.
When I come across a file or directory name with a space, my last resort is to escape it; I usually use the wildcard to avoid extra typing.
If the file name is This File
I cd or ls or whatever to Th* or whatever is the first unique set of characters that delineates the name.
I guess I am just lazy π
And yes if I intend a rm This File, by using rm Th* I always first to an ls Th* and if it's OK recall the line and replace ls with rm. I am lazy, but very careful π - 0
Community User ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
Lol. Same. I type as little as I need to in order to accomplish the task at hand.
I don't like to think of people like you and me as lazy, but rather efficient.
- 0
nerowolfe ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
macwiz1220 wrote:
Lol. Same. I type as little as I need to in order to accomplish the task at hand.I don't like to think of people like you and me as lazy, but rather efficient.
I am often sardonic in my postings π