2016-07-07 28 views
0

我是Imagemagick和linux的新手。如何在Linux中找到臨時文件夾。我用liferay使用Imagemagick。如何在linux中找到imagemagick temp文件夾?

$ ll 
-rwxrwxrwx 1 root root 24332 Jun 3 05:56 a.pdf convert a.pdf -debug coder a.jpg Error: /syntaxerror in -file- Operand stack: 

Execution stack: %interp_exit .runexec2 --nostringval-- 
--nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1894 1 3 %oparray_pop 1893 1 3 %oparray_pop 1877 1 3 %oparray_pop 1771 1 3 %oparray_pop --nostringval-- %errorexec_pop .runexec2 
--nostringval-- --nostringval-- --nostringval-- 2 %stopped_push Dictionary stack: --dict:1165/1684(ro)(G)-- 
--dict:0/20(G)-- --dict:77/200(L)-- Current allocation mode is local Current file position is 57 GPL Ghostscript 9.06: Unrecoverable error, exit code 1 convert: Postscript delegate failed `a.pdf': No such file or directory @ error/pdf.c/ReadPDFImage/678. convert: no images defined `a.jpg' @ error/convert.c/ConvertImageCommand/3046. 

回答

1

最簡單的方法,是尋找您所設置的任何環境變量,例如:通過運行

  • MAGICK_TEMPORARY_PATH
  • MAGICK_TMPDIR

env | grep -i MAGICK 

否則,如果您尚未設置任何環境變量,請執行一些操作,以便強制ImageMagick使用磁盤。因此,例如:

convert -debug cache -limit memory 0 xc:black null: 
2016-07-07T16:28:17+01:00 0:00.000 0.000u 6.9.5 Cache convert[55942]: cache.c/SetPixelCacheExtent/3737/Cache 
    extend black[0] (/var/tmp/magick-55942ZyrN1AO8SfVA[3], disk, 8B) 
2016-07-07T16:28:17+01:00 0:00.000 0.000u 6.9.5 Cache convert[55942]: cache.c/OpenPixelCache/4020/Cache 
    open black[0] (/var/tmp/magick-55942ZyrN1AO8SfVA[-1], Map, 1x1 8B) 
2016-07-07T16:28:17+01:00 0:00.010 0.000u 6.9.5 Cache convert[55942]: cache.c/DestroyPixelCache/1121/Cache 
    destroy black[0] 

這表明您的機器正在使用/var/tmp

+0

謝謝先生回答我的問題。 env | grep -i MAGICK給出沒有輸出意味着沒有爲我的機器設置環境變量 –

+0

convert -debug cache -limit memory 0 xc:black null: 2016-07-08T05:23:14 + 00:00 0:00.010 0.000u 6.7。 8 cache cache [5533]:cache.c/ExtendCache/3953/Cache extend black [0](/ tmp/magick-0JRaxgjj [3],disk,8B) 2016-07-08T05:23:14 + 00: 00 0:00.010 0.000u 6.7.8高速緩存轉換[5533]:cache.c/OpenPixelCache/4151 /高速緩存 開放黑色[0](/ tmp/magick-0JRaxgjj [-1],內存映射,1x1 8B) 2016-07-08T05:23:14 + 00:00 0:00.020 0.000u 6.7.8 Cache轉換[5533]:cache.c/DestroyPixelCache/1448/Cache destroy black [0] –

+0

我的機器使用/ tmp/as臨時文件夾 –

相關問題