Live data from Hacker News

Rob Pike: the origin of dotfiles

plus.google.com

151–156 of 156 posts

Re: Rob Pike: the origin of dotfiles

#151
post #143

Earlier quoted context omitted.

my problem with that "one" directory is that i have to take care specifically to back it up. applications that at least use ~/.cache means i don't have to worry about backing up a bunch of useless stuff.

Isn't that what /tmp is for? Why not put cache files into /tmp/ with 0700 permission?

No, that's not necessarily what /tmp is for.

Consider a browser cache. /tmp is not guaranteed to be preserved between program invocations[1]. /var/tmp [2] might be a better place. /var/cache [3] is intended for exactly this kind of thing.

Unfortunately, it can be far more useful for an administrator in a multi-user setup to want user-specific caches in home directories. That way, you get all of the infrastructure for managing user data for free, like quotas.

Also note: if you're considering putting data into /tmp or /var/tmp, please honor the TMPDIR environment variable, if it is set[4].

[1]: http://www.pathname.com/fhs/pub/fhs-2.3.html#TMPTEMPORARYFIL...

[2]: http://www.pathname.com/fhs/pub/fhs-2.3.html#VARTMPTEMPORARY...

[3]: http://www.pathname.com/fhs/pub/fhs-2.3.html#VARCACHEAPPLICA...

[4]: http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_...

Re: Rob Pike: the origin of dotfiles

#152
post #146
post #91

Earlier quoted context omitted.

Perhaps the op prefers to use the registry to store settings.. After all HKEY_XXX1230_APP_123 is so friendly.

Excuse me, but much more typical example is HKEY_CURRENT_USER\Software\MiKTeX.org\MiKTeX\2.9\Core. The registry has rather respected conventions.

Yes, thanks.

Re: Rob Pike: the origin of dotfiles

#153
post #61

Earlier quoted context omitted.

shrug , it seems to have all worked out pretty well.

But all programs must make exceptions for these entries. Imagine trying to add a third magic filename, '...', for the grandparent for example. You would have a lot of coding to do. Not really possible. It would have been better to mark the dirs as special somehow rather than having each program have the convention programmed in.

...and of course even the kernel had to have exceptions for them anyway - it knew they were special because it had to stop userspace from unlink()ing or rename()ing them.

Re: Rob Pike: the origin of dotfiles

#154
post #118
post #108

Earlier quoted context omitted.

All of your points are invalid for a simple reason: Almost no software uses this fancy standard. And for the backup-case: Whitelisting is usually a futile idea to begin with. Normally you'd prefer to backup the odd superfluous file rather than miss an important one. Luckily most of the apps used on Linux systems now use it Excuse me? $ find ~ -maxdepth 1 -name ".*" | wc -l 228 $ find ~/.local | wc -l 4 $ uname Linux

% uname Linux % find ~/.local | wc -l 16824 % find ~ -maxdepth 1 -name ".*" | wc -l 279

> % find ~/.local | wc -l

Missing something?

Re: Rob Pike: the origin of dotfiles

#155
post #67
post #16

Earlier quoted context omitted.

I see no benefit. It's not at all easy to understand, nor easy to implement, nor does it have any tangible advantages. It's one of these superfluous pseudo-standards that do nothing but add needless clutter. But gladly nobody seems to be using it anyway, I see only one directory in my ~/.local: vlc.

You are running a modern linux distro with only one file/dir in .local?

FreeBSD 7.1-RELEASE - No ~/.local, ~/.config

FreeBSD 9.0-RELEASE - No ~/.local, ~/.config

Linux 3.2.0-23 - No ~/.local, ~/.config

Linux 3.0.0-16 - No ~/.local, ~/.config

Linux 3.0.0-12 - No ~/.local, ~/.config

Honestly, I'd never even heard of this scheme before today.

Re: Rob Pike: the origin of dotfiles

#156
post #67

Earlier quoted context omitted.

You are running a modern linux distro with only one file/dir in .local?

FreeBSD 7.1-RELEASE - No ~/.local, ~/.config FreeBSD 9.0-RELEASE - No ~/.local, ~/.config Linux 3.2.0-23 - No ~/.local, ~/.config Linux 3.0.0-16 - No ~/.local, ~/.config Linux 3.0.0-12 - No ~/.local, ~/.config Honestly, I'd never even heard of this scheme before today.

I guess I should have said "a modern linux desktop environment." Are these shell boxes or desktops? In my experience the majority of propgrams that use this spec are gtk/qt programs.

PS Listing a kernel version does not really provide any information about your modern linux distro.

Post reply on HN