How to Copy Folder and All of It’s Containing File and Folder in Linux Command Line Console

For you who use linux for the first time and try to copy a folder with all of the file in it using console command line mode, you may find that you can not use your ordinary command such as cp pathtoyourcurrentfolderplace pathtoyournewfolderplace when you want to copy a folder to a new place. So how to overcame this problem? Here you are:

You should use -R option to do that, so the command will become cp -R pathtoyourcurrentfolderplace pathtoyournewfolderplace


cp -R /home/John/tutorial /home/Patric

cp = copy command
-R = recursive option (to copy folder and all of it’s contain)
/home/John/tutorial = a folder that want to be copied
/home/Patric = destination folder

ok, thanks for visiting, have a nice day, never give up to try, and see you next time…