- Forums
- Linux
- How To Copy All Files In A Directory With Linux
Copying Files From A Directory Is Easy In Unix If You Have A Linux Server You Can Access Your Shell Console Terminal To Send Commands [3250], Last Updated: Mon Jun 24, 2024
Webune Tutorials
Mon Oct 12, 2009
0 Comments
402 Visits
Welcome to Webune Support Forums.
We offer dedicated Linux Servers.
today we are going to show you how you can copy all of the files in a directory.
lets say i have a website on my server and all the files for the website are located in the www directory:
/home/mydomain/web/www/
and i want to copy all the to another directory at:
/home/otherdomain/web/public_html
ok this is the command to copy the files
cp -rf /home/mydomain/web/www/ /home/otherdomain/web/public_html
thats it
the basic syntax for copy is:
copy this_file.txt to_this_file.txt
[NOTE: if to_this_file.txt does not exists, it will create it automatically]