grep foo bar > baz
then forgotten to remove baz-and found it, weeks later, cluttering up your directory and wasting disk space? Yeah, me too. So I decided to make my temporary files in the system temporary-file directory, /tmp.
Everyone on the system has permission to write files there. Because there are lots of temporary files, it's good to use.
If your file doesn't have, other people on the system won't be able to read or write it. But they may be unless the /tmp directory's is set. That usually isn't a problem, but you should know that it can happen.
Most systems delete leftover files in /tmp every day or so, when the filesystem fills up, or at least when the system is rebooted. So, don't use /tmp for a file that you want to keep for a while. Your system may have other directories for temporary files, like, that aren't erased as often. Your system administrator should be able to tell you.