2

cp not working in script

view story
linux-howto

http://www.unix.com – Ok, this is the first script I've ever attempted to write so go easy on me. I'm just trying to simple copy a tar.gz file from the directory the script is located to /usr/local/filename.tar.gz The script is run as root so it shouldn't be a permissions issue. (at least to my knowledge) This is what it looks like #!/bin/bash HADOOP="hadoop-1.0.3.tar.gz" cp $HADOOP /usr/local/$HADOOP -v tar xzf /usr/local/$HADOOP mv /usr/local/$HADOOP hadoop chown -R hduser:hadoop hadoop What happens is the following: $hadoop is never copied to the /usr/local directory and then after that (HowTos)