
명령을 시도했는데 cp /vol/examples/tutorial/science.txt .
오류가 발생했습니다.
cp: cannot stat `/vol/examples/tutorial/science.txt': No such file or directory
왜 이런 일이 일어나는지 이해할 수 없습니다. cygwin 홈 폴더로 가서 필요한 폴더 구조와 텍스트 파일을 만들었습니다. 폴더 구조와 이름도 확인했어요.
또한 들어가서 문서를 읽을 수 있습니다 ~/vol/examples/tutorial
. cat science.txt
그렇다면 CP 명령이 작동하지 않는 이유는 무엇입니까?
답변1
이렇게 하면 다음 내용을 이해할 수 있습니다.
cd ~/vol/examples/tutorial
pwd
아마도 pwd의 결과는 다음과 같습니다 /vol/examples/tutorial
./home/username/vol/examples/tutorial
~는 일반적으로 심지어 cygwn /home 아래의 사용자 홈 디렉토리로 대체됩니다.