19763 shaares
136 private links
136 private links
Today in some versions of Linux ls puts single quotes around file names which contain white space likely in order to have those paths easier to copy and paste, but it does so only if !isatty().
I’m not a great fan of changing a program’s well-known behaviour, specially in a case such as with GNU ls which already uses an environment variable for coloring output; it would likely have been easy to augment that for the file name quoting.
It used to be simpler to teach. (But I don’t really teach Unix beginners any more.) :-)