Cp


From Knoppix Documentation Wiki
Revision as of 16:34, 13 July 2008 by 202.154.255.5 (Talk)

Jump to: navigation, search

lasitorac cp is the Linux copy file command. cp has many options.

cp file1.txt file2.txt

The basic form of the copy command copies one file from one location to another.

cp -p file1.txt file1org

One useful variation of the command is to preserve all the attributes of the source file. In this case, the source files is file1.txt.

cp -rp /home/* /mnt/backup/home

The recursive option can be added to the perserve option. This combination of options is helpful during the recovery of a failed system. knoppix can be used to mount a bad harddrive. You can attempt to use the copy command to copy all the files that are salvagable.