Home | 簡體中文 | 繁體中文 | 雜文 | Search | ITEYE 博客 | OSChina 博客 | Facebook | Linkedin | 作品與服務 | Email

18.6. su - run a shell with substitute user and group IDs

Change the effective user id and group id to that of USER.

[neo@development ~]$ su - root
		
[neo@development ~]$ su root -c "rm -rf linux/"	
		
		
su - www -c "/srv/apache-tomcat-www/bin/startup.sh"
su - www -c "/srv/apache-tomcat-m/bin/startup.sh"

su - www -c "/srv/java/bin/java -jar /www/netkiller.cn/api.netkiller.cn/api.netkiller.cn-0.0.2-SNAPSHOT.jar &"
		
		
comments powered by Disqus