使用Python selenium调用phantomjs 后会在/tmp下产生大量的tmp缓存文件,文件无内容,但是占用大量系统资源,phantomjs如何关闭此类缓存文件?由于程序是每小时启动一次,因此每天会产生很多此类tmp文件,除了手动删除外,是否有其他方法关闭?
-rw------- 1 freedom freedom 0 2月 26 10:34 tmp3735g_
-rw------- 1 freedom freedom 0 2月 26 10:39 tmp3HR8Qd
-rw------- 1 freedom freedom 0 2月 26 10:35 tmp4DSGmV
-rw------- 1 freedom freedom 0 2月 26 10:35 tmp_9UmjE
-rw------- 1 freedom freedom 0 2月 26 10:39 tmpJ6tAuB
-rw------- 1 freedom freedom 0 2月 26 10:35 tmpkjM6Mb
-rw------- 1 freedom freedom 0 2月 26 10:35 tmpMwCZ1q
-rw------- 1 freedom freedom 0 2月 26 10:34 tmpptEuMa
-rw------- 1 freedom freedom 0 2月 26 10:38 tmprEYmPc
-rw------- 1 freedom freedom 0 2月 26 10:34 tmpsphtfq
-rw------- 1 freedom freedom 0 2月 26 10:36 tmpyXXWwC
freedom 4689 2003 0 10:38 pts/1 00:00:00 /usr/lib/phantomjs/phantomjs --cookies-file=/tmp/tmprEYmPc --webdriver=52321
freedom 4880 2003 0 10:39 pts/1 00:00:01 /usr/lib/phantomjs/phantomjs --cookies-file=/tmp/tmp3HR8Qd --webdriver=33829
freedom 5041 2003 0 10:39 pts/1 00:00:01 /usr/lib/phantomjs/phantomjs --cookies-file=/tmp/tmpJ6tAuB --webdriver=36861
启动 phantomjs 时设置 --cookies-file 参数, 请参考 http://phantomjs.org/api/comm...