I was wondering if this code was correct or not. I am trying to copy all the files and subdirectories in one directory to a newly created directory.


cp -R dir/*newdir/*


any suggestions?

Recommended Answers

All 2 Replies

cp -R directoryname newdirectoryname

I was wondering if this code was correct or not. I am trying to copy all the files and subdirectories in one directory to a newly created directory.


cp -R dir/*newdir/*


any suggestions?

cp -r dir/* newdir/

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.