OS

Virtualhost 갯수 보는 명령어

까마기 2014. 10. 22. 01:28
728x90
반응형
cat /usr/local/apache/conf/extra/httpd-vhosts.conf | grep ServerName | sed '/ServerName/p' | wc -l




< Virtualhost domain 명만 출력 >

cat /usr/local/apache/conf/virtual.conf | grep ServerName | sed '/ServerName/p'
--> ServerName domain 출력


# cat /usr/local/apache/conf/virtual.conf | grep ServerName | sed '/ServerName/p' | awk '{print $2}'


domain만 출력


# cat /usr/local/apache/conf/virtual.conf | grep ServerName | sed '/ServerName/p' | awk '{print $2}' | sort -u 


--> 중복된 열 제거

반응형