The Cookie Machine - Click here to drag window

DUMMY TEXT - Real text set in assets/js/theCookieMachine.js

If you can read me, I'm broken!

Views: 1,301     Votes:  4     ✅ Solution
Tags: bash   directory   tmp   multi-user   single-user  
Link: 🔍 See Original Question on Ask Ubuntu ⧉ 🔗

URL: https://askubuntu.com/q/882608
Title: Considerations for using `/tmp` directory on multi-user systems
ID: /2017/02/12/Considerations-for-using-__tmp_-directory-on-multi-user-systems
Created: February 12, 2017
Upload: September 15, 2024    Layout:  post
TOC: false    Navigation:  false    Copy to clipboard:  false


As I’ve been learning more about Ubuntu and bash programming I’ve been storing variables in /tmp. For example in-between calls to the same bash script I want to record the previous state.

On my current single user system there is no danger of conflicts in /tmp directory. However I want my code to be future-proof and wonder if I should get in the habit of using a directory called ~/tmp?

Perhaps it should be ~/.tmp and hidden. Perhaps it should be ~/temp so as not to be confused with conventional /tmp directory.

Any ideas / suggestions are appreciated. Thank you.

⇧ How To View Process Instead Of Splash Screen During Boot By Pressing A Key? In Ubuntu Unity, can I display the output of a bash script in the systray area?  ⇩