Leading spaces are common, actually
Posted Mar 27, 2009 4:41 UTC (Fri) by
barryn (subscriber, #5996)
In reply to:
Leading spaces are common, actually by njs
Parent article:
Wheeler: Fixing Unix/Linux/POSIX Filenames
Behavior of ls in Mac OS X 10.5.6 build 9G55:
$ pwd
/Library/Application Support/GarageBand/Instrument Library/Track Settings
$ ls -l Master | head
total 0
drwxrwxrwx 3 root admin 102 May 3 2008 Basic
drwxrwxrwx 6 root admin 204 May 3 2008 Ambient
drwxrwxrwx 6 root admin 204 May 3 2008 Classical
drwxrwxrwx 11 root admin 374 May 3 2008 Dance
drwxrwxrwx 5 root admin 170 May 3 2008 Hip Hop
drwxrwxrwx 5 root admin 170 May 3 2008 Jazz
drwxrwxrwx 7 root admin 238 May 3 2008 Pop
drwxrwxrwx 7 root admin 238 May 3 2008 Rock
drwxrwxrwx 5 root admin 170 May 3 2008 Stadium Rock
$
And this matches the Finder's behavior. BTW, if the Finder behaved any other way, it would be
more difficult to properly recover broken Mac OS 9.x or earlier installations using OS X -- Classic
Mac OS loads files in /System Folder/Extensions in lexicographic order, and the load order
matters, and the leading space trick is used very frequently there. Mac OS X 10.5 can dual-boot
with Mac OS 9.x, so this still matters for some users.
(
Log in to post comments)