Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question

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

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

1  
What are the permissions on /projects? –  Anonymous Jan 26 '11 at 22:26

2 Answers 2

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.

share|improve this answer

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
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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