我的服务器上有一个名为error.log的文件,我需要经常截断.我对该文件拥有rw权限.在vi中打开文件>删除所有内容>保存工作(显然).但是当我尝试下面的时候
cat /dev/null > error.log
Run Code Online (Sandbox Code Playgroud)
我收到了消息
File already exists.
Run Code Online (Sandbox Code Playgroud)
显然,在服务器上进行了某种配置以防止意外覆盖文件.任何人都可以告诉我如何在一个命令中"截断"文件?
我在ubuntu机器上安装了postgreSQL版本8.3.这是通过apt get安装的.当我试图找到一个写有一些plsql函数的数据库转储时,我收到以下错误 -
could not access file "$libdir/plpython": No such file or directory
Run Code Online (Sandbox Code Playgroud)
当我尝试为特定数据库启用python支持时,我又遇到了另一个错误 -
$ createlang plpythonu <dbname> -U postgres
createlang: language installation failed: ERROR: could not access file "$libdir/plpython": No such file or directory
Run Code Online (Sandbox Code Playgroud)
有没有办法我可以添加对python的支持而无需重新安装postgreSQL?