Contact us

Print

Using cp

The “cp” command stands for copy. It makes copies of files or directories.

1. Change your directory to the folder2 directory.
2. Copy the contents of folder2 (temp_file21 and temp_file22) to folder1

[root@localhost folder2]# cp temp_file21 temp_file22 ../folder1

3. List the contents of folder1.


[root@localhost folder2]# ls ../folder1

temp_file11 temp_file12 temp_file21 temp_file22


4. List the contents of folder2. Note that the original copies of temp_file21 and
temp_file22 remain in folder2.

[root@localhost folder2]# ls

temp_file21 temp_file22




Created by: system. Last Modification: Wednesday 26 of November, 2008 19:21:25 EST by wale.

...