发生了什么事TMP环境变量? [英] What happened to the TMP environment variable?

查看:688
本文介绍了发生了什么事TMP环境变量?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我总是听说找一个UNIX机器上的临时文件夹的正确方法是看TMP环境变量。当写code,在Windows上工作以及Linux,我会检查TEMP和TMP。

I always heard that the proper way to find the temporary folder on a UNIX machine was to look at the TMP environment variable. When writing code that worked on Windows as well as Linux, I would check for TEMP and TMP.

今天,我发现我的Ubuntu安装不具有环境变量都没有。

Today, I discovered that my Ubuntu install does not have that environment variable at all.

我知道这似乎你总是可以指望上的/ tmp在那里把你的临时文件,但我明白,TMP的样子,用户可以告诉你把临时文件别的地方。

I know it seems you can always count on /tmp being there to put your temporary files in, but I understood that TMP was the way the user could tell you to put the temporary files someplace else.

现在仍然是这样吗?

推荐答案

您可能会想的<一个href=\"http://www.opengroup.org/onlinepubs/000095399/basedefs/xbd_chap08.html\"><$c$c>TMPDIR.

You are probably thinking of TMPDIR.

此变量应当重新present一个目录用于需要的地方创建临时文件的程序提供一个路径。

This variable shall represent a pathname of a directory made available for programs that need a place to create temporary files.

这篇关于发生了什么事TMP环境变量?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆