开发者

cp command simply not copying

I am working on a shell script and for some reason when I say

cp full_path/* full_path_directory/ 

I get an error. I have echoed out the command and when I run what it echos in an interactive shell it works. I开发者_JAVA百科 can't figure out why it won't work in a shell script. I'm using full paths rather than absolute. I have tried to putting a slash at the end of the destination directory and then not putting a slash...what else could it be?

Error:

cp: /opt/local/apache2/htdocs/baseline/*: No such file or directory

So when I echo it out I get:

/opt/local/apache2/htdocs/baseline/* /opt/local/apache2/htdocs/test/


It means what it says. There are no files in /opt/local/apache2/htdocs/baseline/ directory, or you don't have permissions to read the directory. What does ls show you?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜