Edit: Thank you guys for your insightful answers!
- Dandroid ( @dandroid@dandroid.app ) 48•1 year ago
I use command line a lot. I hate needing to add backslashes before spaces or put quotes around file names. It’s easier to just use underscores.
- davefischer ( @davefischer@beehaw.org ) 27•1 year ago
If you spend a lot of time at the command line, then spaces in filenames are REALLY annoying. If you don’t, it doesn’t matter.
- CetaceanNeeded ( @CetaceanNeeded@lemmus.org ) English18•1 year ago
WelcomeToCamelCaseMyFriend.png
- Michal ( @Michal@discuss.tchncs.de ) 8•1 year ago
But then you have to press shift if you want to use the file in Linux terminal…
- jrubal1462 ( @jrubal1462@mander.xyz ) 3•1 year ago
…But at least it saves you from having to use quotes or escaping out the spaces with \
- Michal ( @Michal@discuss.tchncs.de ) 3•1 year ago
I’d rather use snake_case for file names in Linux that way you don’t have to press shift until the end of the first word, and byt that time you probably have enough characters for tab completion.
- Posts ( @Posts@discuss.tchncs.de ) 1•1 year ago
Or make your shell be case-insensitive
- RickyRigatoni ( @RickyRigatoni@lemmy.ml ) 1•1 year ago
or pressing capslock before and after each uppercase, if you’re one of those people
- helpimnotdrowning ( @helpimnotdrowning@lemmy.sdf.org ) 13•1 year ago
TLDR; No
It hasn’t been necessary in a long time, unless you’re a developer who frequently needs to type in filenames in everywhere (since the command line needs extra protection against spaces and other symbols)
The OS (Windows, Mac, Android, etc) handles thar all for you so you don’t have to worry about it (unless you happen to use a badly-written program that doesn’t understand spaces, but this is super rare to begin with, and more protected against as time goes on)
- Can-Utility ( @Can_Utility@beehaw.org ) 1•1 year ago
I maintain a number of Drupal websites as part of my job. Our stakeholders have varying degrees of familiarity with the ins and outs of computing.
A few months ago I got a ticket from one of our stakeholders. Apparently PDF files were broken across large swathes of their site. What happened was Red Hat pushed through an update to apache that closed some security loopholes. As an unexpected side effect, it also meant that any files being served from Drupal’s private file system would break if the files contained spaces in the names. No rewrite rules seemed to fix the issue; we ended up having to go into the rendered HTML and replace all the spaces in the links with ‘+’ signs. They are now told to make sure future files have underscores instead of spaces in the filename.
So yes, in some cases you still need to use _ (or some sort of non-space character) in file names, even today.
- stealth_cookies ( @stealth_cookies@lemmy.ca ) 10•1 year ago
That depends, if you have the fortune (misfortune?) of using the CAD software Creo/ ProE from PTC then spaces are verboten since they haven’t progressed from the days where the software was written for UNIX.
- socsa ( @socsa@lemmy.ml ) 8•1 year ago
Only if you want my respect
- Schnaftator ( @Schnaftator@lemmy.sdfeu.org ) 8•1 year ago
Why underscores? Dashes are easier to type!
- charje ( @charje@lemmy.ml ) 5•1 year ago
Using
-
is much nicer. - 𝘋𝘪𝘳𝘬 ( @Dirk@lemmy.ml ) 4•1 year ago
Windows has issues with leading spaces in certain applications, but no, you don’t need to replace spaces with underscores in general nowadays.
- not_amm ( @not_amm@beehaw.org ) 3•1 year ago
Personally, I try to keep some rules for myself while using a system. I used to use spaces for readability, but then it was kind of hard to remember all the names of my files, so i just went with a conceptual naming. I now use keywords and some classification like numbers or date before the keywords, it has helped me to find files quicker and with less words than before.
I’d still advise against it if you’re using Windows. A space is interpretered as more than a single character meaning you’ll hit the 255 character limit for paths quicker if you have a large folder structure. I’ve seen this happen many times in my time as a support technician.