Paging Lennart... paging Lennart... he must be around here somewhere...
Fedora 24 (and all cutting-edge distros) has a nice surprise:
touch filenospace touch file\ with\ spaces /bin/ls
'file with spaces' filenospace
Huh? I don't recall putting single-quotes in the filename. http://unix.stackexchange.com/questions/258679/why-is-ls-suddenly-wrapping-i...
Oh, so the genius "we know better than 45 years of *NIX" people strike again.
"Why is this happening?" Several coreutils developers decided they knew better than decades of de facto standards.
This change appears in coreutils 8.25-something. If you're running an older distro with 8.24, thank your lucky stars.
Fix is... very systemd-esque ("it's your fault, you must do something to return to normalcy"):
/bin/ls -N
file with spaces filenospace
So update all your aliases folks, on every system, and re-source the alias file... assuming this would drive you as batty as it does me.
Debian has reverted this change as they realized it was insanity. Fedora hasn't (I don't even see a bz for it). OpenSUSE already aliases to -N by default.
The coreutils devs seem to think this bug is a good thing so as to make cutting & pasting consistent for noobs. Hmm, I'm not sure noobs are using the command line all that much, at least not enough to cause the old hands to go insane. And I'm still of the school that spaces don't belong in filenames unless absolutely necessary!
What's your take? Any one for this change?
/RANT
And I'm still of the school that spaces don't belong in filenames unless
absolutely necessary!
Bravo! I'm even more hardline on this one. I'm still of the school that spaces don't belong in filenames under any circumstance! With CamelCase, hyphens, and underscores available (not requiring any quotes anywhere), who needs spaces? And where would "unless absolutely necessary" ever occur?
Hartmut W Sager - Tel +1-204-339-8331
On 4 February 2017 at 00:47, Trevor Cordes trevor@tecnopolis.ca wrote: [.....]
*sigh* If it was a grand conspiracy by the *BSD folks (and possible Oracle, IBM, and HPE) to drive people to other UNIXes, this might actually make sense. As-is, *&^%$#@!. -Adam
-----Original Message----- From: Roundtable [mailto:roundtable-bounces@muug.ca] On Behalf Of Trevor Cordes Sent: February 4, 2017 00:47 To: MUUG RndTbl roundtable@muug.ca Subject: [RndTbl] ls auto-quote rant
Paging Lennart... paging Lennart... he must be around here somewhere...
Fedora 24 (and all cutting-edge distros) has a nice surprise:
touch filenospace touch file\ with\ spaces /bin/ls
'file with spaces' filenospace
Huh? I don't recall putting single-quotes in the filename. http://unix.stackexchange.com/questions/258679/why-is-ls-suddenly- wrapping-items-with-spaces-in-single-quotes
Oh, so the genius "we know better than 45 years of *NIX" people strike again.
"Why is this happening?" Several coreutils developers decided they knew better than decades of de facto standards.
This change appears in coreutils 8.25-something. If you're running an older distro with 8.24, thank your lucky stars.
Fix is... very systemd-esque ("it's your fault, you must do something to return to normalcy"):
/bin/ls -N
file with spaces filenospace
So update all your aliases folks, on every system, and re-source the alias file... assuming this would drive you as batty as it does me.
Debian has reverted this change as they realized it was insanity. Fedora hasn't (I don't even see a bz for it). OpenSUSE already aliases to -N by default.
The coreutils devs seem to think this bug is a good thing so as to make cutting & pasting consistent for noobs. Hmm, I'm not sure noobs are using the command line all that much, at least not enough to cause the old hands to go insane. And I'm still of the school that spaces don't belong in filenames unless absolutely necessary!
What's your take? Any one for this change?
/RANT _______________________________________________ Roundtable mailing list Roundtable@muug.ca https://muug.ca/mailman/listinfo/roundtable
Filenames with spaces are problematic and I avoid if I can. Not sure if this change would have prevented a problem from the past.
In the days of MBnet(early 1990s) one of the sysadmins wrote a script to clean out /tmp. It was successfully running for a few weeks but one weekend the system crashed with most of the file system deleted. Of course I initially thought we were hacked but could find no evidence of it. Next weekend the same thing happened. At this point I called for help and we had all of the Unix support people on the Eng 6th floor in trying to figured it out. Gary Mills finally discovered a rm command in a memory dump. It was removing directories/files under /tmp/.. which of course is /. He realised what was happening. Because we had disk quotas a user created a directory with the name '/tmp/ ..' to save their files. If you did an ls on /tmp you would see a .. file with a leading space which was of course was misleading. If that filename was enclosed with quotes it would have been easily identified and also perhaps the script to clean up /tmp would not have failed.
-- Bill
On 2017-02-04 12:47 AM, Trevor Cordes wrote:
Fedora 24 (and all cutting-edge distros) has a nice surprise:
touch filenospace touch file\ with\ spaces /bin/ls
'file with spaces' filenospace
I find this an interesting topic. Technically, there is absolutely nothing wrong with spaces in file names. The OS and file systems are designed to allow it, and frankly, users love it (just browse any company file system if you doubt me). The reality is, the only reason admins hate spaces is because BASH is so terrible at handling them. Like really _really_ terrible. I don't do much bash scripting anymore so I've gotten a bit rusty on all the ticks for escaping spaces, so much so that the other day I was trying to write what should have been a simple script, and I had to give up and write it in PHP instead.
So what does it say about Linux when the most popular shell is basically incompatible with it's own file system? Why are we still stuck with this crappy shell?