1. 27

  2. 33

    This isn’t a csh feature. It’s just a convention of the system. There was a cron job that runs a daily script that deletes old scratch files.

    find / ! -fstype local -a -prune -o \
        \( -name '[#,]*' -o -name '.#*' -o -name a.out -o -name core \
           -o -name '*.CKP' -o -name '.emacs_[0-9]*' \) \
                -a -atime +3 -exec rm -f -- {} \;


    1. 12

      This person uses csh? Ye cats.

      1. 10
      2. 3

        I use a tempfike name (‘tt’ in my case - inherited from my first Unix mentor, who may have got it from ATT. Anyone else use the same?). Any tt* file (tt.go, tt.json, ttt) can be.nuked at any time. If I want to keep it I rename. Naming is important, and.‘tt’ really just means “the current thing” to me….i.e. “it” in English or $_ in perl.

        1. 1

          I tend to use ‘fred’, it just roles off the fingers with a qwerty keyboard.

          1. 1

            Wait—really? Hah, I thought I came up with naming files ‘tt’.

          2. 3

            I use ,* as the convention for a temp file. It doesn’t conflict with any other software that I’ve ever encountered. My .gitignore files contain ,*.

            A , is easier to type than a #. Also, if you type rm #* it doesn’t work because # is a shell comment, and quoting is more work, but rm ,* works fine.

            1. 1

              For the record, you don’t need to quote to escape #, \# will do.

            2. 1

              I remember scratch file specs in JCL on IBM mainframes back in the 1970s.

              1. 1

                this seems like quite an interesting idea. I’m curious as to how tools like ls would handle them, however; would they act as hidden files, or be shown alongside everything else? I feel that I’d find them cluttering, although I already have a shell script that acts as a scratchpad if I need one, and of course the Emacs scratch buffer :)

                1. 1

                  I wonder if this could be implemented using Bash prompt hooks.