First page Back Continue Last page Overview Graphics
Copying Files and Directories
cp <source> <destination>
cp -R <source_folder> <destination>
Notes:
# cp /home/alex/.bashrc /home/ddrew
is the same as
# cp /home/alex/.bashrc /home/ddrew/.bashrc
(given enough permissions)
cp -R means “copy everything under the source folder recursively”.
So, to copy the entire /var/log/ directory under /home/alex/, you would say:
# cp -R /var/log /home/alex
The new copy of /var/log would then be stored under /home/alex/log/