“bash:无法为此处文档创建临时文件:设备上没有剩余空间”

Tim*_*Tim 5 disk-usage tmp files

/只剩下大约 800MB 的可用空间。我想这就是原因

$ convert * book.pdf
Segmentation fault (core dumped)
bash: cannot create temp file for here-document: No space left on device
Run Code Online (Sandbox Code Playgroud)

我认为convert(来自 Imagick)用于/tmp存储临时文件。当前目录下的文件为188个pngjpg文件总数约70MB。为什么 800MB 可用空间\不能满足convert

我可以绕过限制空间/吗?我还有更多的空间~和其他分区,而且我还有外部 USB 存储设备。谢谢。

jim*_*ara 5

# do this part one time only
mkdir /path/to/mytmp
chmod 1777 /path/to/mytmp

# put this in .bashrc or your login .profile  file
# it has to execute BEFORE you want TMPDIR to work
export TMPDIR=/path/to/mytmp
Run Code Online (Sandbox Code Playgroud)

FWIW-根“/”目录上的 800 MB 可用空间听起来不是一个长期的好主意。如果 / 目录已满,您的系统将冻结和/或您将收到各种错误。不要让这种情况发生。