[root@localhost ~]# su postgres 切换用户 bash-4.2$ psql could not change directory to "/root": Permission denied psql (9.5.6) Type "help" for help. postgres=# psql -Upostgres postgres-# psql -Upostgres</root/Desktop/db.sql 我的脚本在桌面 =====
[root@MSJTVL-MJSP-A01 sm01]# vim /etc/rc.d/rc.local #!/bin/sh # # This script will be executed *after* all the other init scripts. # You can put your own initialization stuff in here if you don't # want to do the full Sys V style init stuff. touch /v