I am new to Linux. I am trying to copy some files from one folder on a Linux server to another folder on the same folder. The folders have different owners; however, I have read and write permissions on both folders. I used the command

chmod 777 /tmp/source_data

and then I tried the command

cp -r /tmp/source_data /projects/project_1

However, I got the error "file or directory not found". Can someone please give me some advise?

link|improve this question
1  
What are the permissions on /projects? – Anonymous Jan 26 '11 at 22:26
feedback

migrated from stackoverflow.com Jan 27 '11 at 0:00

This question came from our site for professional and enthusiast programmers.

3 Answers

up vote 0 down vote accepted

I'm assuming that the /projects/project_1 directory doesn't exist judging by the error. Either that, or you're in the wrong directory, you might need to use the full path.

link|improve this answer
feedback

You are getting this error because the folder /projects/project_1 doesn't exist, you will need to create it like so:

mkdir /projects/project_1

And then do the cp command:

cp -r /tmp/source_data /projects/project_1
link|improve this answer
feedback

you need to chmod /projects folder too.

link|improve this answer
-1: This wouldn't be the case with a "File or directory not found" error. – Wuffers Jan 27 '11 at 0:02
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.