[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: repeated system mail, /etc/.pwd.lock ?



On Wed, 5 May 2021 David Wright wrote:
[dd]

One thing I didn't learn is why .pwd.lock is in /etc/ rather than,
say, /run/lock/. Perhaps related, why are there dotfiles in /etc/
anyway. (.git/, .java/, .etckeeper, .gitignore are the others.)
What are they hiding from?
[dd]

I would assume that they are "hidden" because they are merely
peripheral or auxiliary to the *purpose* of the directory containing
them.

We tend to group files into directories devoted to one function or
another. This certainly seems to be the unstated premise of hier(7),
for example.

So home directories hold a user's content. Per-user configuration
falls outside that canonical function, hence the ~/.dotfile convention
in home directories.

Likewise, I assume that files under /etc are text files that determine
system configuration, and that if system configuration is something I
care about, then I ought to at least gain a passing familiarity with
each such file under /etc, ideally (eventually) become familiar with
its content and function, and generally consider myself responsible
for the conseqences of that content, take responsiblity for reviewing
and editing it, etc.

To that end, I can occasionally do something like

 $ ls -Rp | less

and make a point of examining the first couple of things that look
unfamiliar.

This misses out dotfiles. But with a few exceptions --which seem to
prove the rule after all-- this omission serves my purposes just
fine. That is, when I understand the purpose of the file hierarchy
then I know where to look to find what I want, and I'm spared the
trouble of ignoring certain files whose presence is
helpful-yet-peripheral to the purpose of a given directory.

So when I look for what I'm missing out on, and do...

 $ shopt -s globstar
 $ ls /etc/**/.[^.]*

...then I find

 * /etc/.pwd.lock, clearly an exception to the /etc profile above
 * various ".placeholder" files, also clear exceptions
 * model (eponymous) home directory config files under /etc/skel
 * some ".depends.*" files in /etc/init.d/ which are not init scripts

I don't have under /etc any of .git/, .gitignore, .etckeeper, .java/.
But don't they contain mere meta-info, relative to the primary purpose
of the directory containing them? (I don't know a thing about .java/
btw, so am curious.)

If I put say /etc/default/ under revision control, I would not want
new meta-files appearing whenever I did "ls /etc/default".

--
Ce qui est important est rarement urgent
et ce qui est urgent est rarement important
-- Dwight David Eisenhower


Reply to: