First page Back Continue Last page Overview Graphics
Example 1-6
Copying files cp
We often need to transfer our data from external storage to our hard disks or vice versa. The easiest way to copy large number of directories or files is to use the command line command cp. For example to copy the contents of this course to your home directory, use the following command,
cp -r /media/mydisk/bash_scripting ~
the switch -r makes the cp command to copy a directory and all of its subdirectories to your home directory (~)