bash -c'는 무엇을 합니까?
저는 다음 튜토리얼을 따랐습니다: http://davidtsadler.com/archives/2012/06/03/how-to-install-magento-on-ubuntu/
어느 순간 다음 명령을 실행하라는 메시지가 표시되었습니다.
sudo bash -c "cat >> /etc/apache2/sites-available/magento-store.com <<EOF
<VirtualHost *:80>
ServerName localhost.magento-store.com
ServerAlias www.localhost.magento-store.com
DocumentRoot /home/dev/public_html/magento-store.com/public
LogLevel warn
ErrorLog /home/dev/public_html/magento-store.com/log/error.log
CustomLog /home/dev/public_html/magento-store.com/log/access.log combined
</VirtualHost>
EOF"
이 명령은 무엇을 수행했으며 어떻게 취소할 수 있습니까?
컴퓨터를 다시 시작했는데 아직도 실행 중인 것 같습니다.찾아봤습니다.bashrc
그리고..profile
하지만 안에서 찾지 못했습니다.
인용 출처man bash
:
-c string -c 옵션이 있으면 문자열에서 명령을 읽습니다.
문자열 뒤에 인수가 있으면 $0으로 시작하는 위치 매개 변수에 할당됩니다.
사용자가 인용한 명령은 여기 문서에 텍스트를 추가합니다(즉, 텍스트는VirtualHost
파일에 태그)를 추가합니다./etc/apache2/sites-available/magento-store.com
.
Bash에 대한 수동 페이지(예:man bash
)에 따르면-c
option은 문자열에서 명령을 실행합니다. 즉, 따옴표 안에 있는 모든 명령을 실행합니다.
당신의 기계나 인터넷에서 남성 페이지를 확인하세요, 이것과 같은.
인용문:
-c string
If the -c option is present, then commands are read from string.
If there are arguments after the string, they are assigned to the positional
parameters, starting with $0.
언급URL : https://stackoverflow.com/questions/20858381/what-does-bash-c-do
'programing' 카테고리의 다른 글
경로에서 디렉터리 추출 (0) | 2023.04.29 |
---|---|
미리 정의된 값을 반복합니다. (0) | 2023.04.29 |
클라이언트 사이드 JavaScript를 사용하여 몇 가지 스타일로 Excel 파일을 만듭니다(가능한 경우 js-xlsx 라이브러리를 사용하여). (0) | 2023.04.29 |
ClosedX에서 통화 형식을 지정하는 방법ML(숫자) (0) | 2023.04.29 |
Tomcat을 사용하여 Eclipse에서 웹 서비스를 실행하는 동일한 경로 오류가 있는 여러 컨텍스트 (0) | 2023.04.29 |