What is cp: cannot stat error in Unix, I get this error when trying to copy thing from one folder to another
问题 Hi I wanted to know why I am getting this error. I have this directory called mock, which inside has another 3 directories. I am trying to copy all the items from mock directory into the projweek directory using the below code. cp /mock/* ~/projweek But I get this error cp: cannot stat ‘mock/*’: No such file or directory any ideas as to why that is? 回答1: If your source directory is set in quotes, then make sure that the * is outside the quotes, i.e. cp "source/"* dest or cp "source"/* dest