davidson (10/25/82)
I use invisible . files for lots of purposes, which would otherwise require an extra directory to contain them in EVERY regular directory: 1. My rm (and mv, cp and ln where they would stomp a file) prepend the file to be removed with a #, and stash them under the directory .save in the directory the file is removed from (successive versions go into .save/1, .save/2, etc.). Thus, I never lose files, but they go away magically as soon as they've been backed up (well, that night). 2. My cd, push and pop aliases (push=pushd, pop=popd) are all of the form `come ; ... ; go', where: alias come `if (-e .chdir_come) source .chdir_come' alias go 'if (-e .chdir_go) source .chdir_go' provide the hooks that allow me to make directories active objects, in which special aliases live, which start up programs automatically on entering, and delete them when leaving, etc. 3. EMACS leaves special . prefixed files in directories to allow EMACS to default to editing the last file you edited in a particular directory. Its actually rather nice. 4. .lock directories in a shared account I set up locked files against multiple editing, by having vi check for (approximately) head-of-filename/.lock/tail-of-filename to see if the file was being edited. 5. .log provided a mechanism for logging the use of files in the same shared account mentioned above. `Invisible' files are great! How can you doubt it after reading DEC WARS!? Greg