Copy Command In Linux

As a system administrator and a good let alone should use Linux then it is reasonable to know variety of existing equipment. Because the median – median server how it looks is a non-graphical text then just aliases for the manipulation of files and directories with the execution of shell commands. One is to copy or duplicate files.

Without a lot of theory, if we want to copy-paste files in Linux then the syntax is:
cp original destination

For example we copy one file only:
cp /var/www/ /home/chandra/web/.htacccess

File name purpose must not be same as the original. You can also name the not_htaccess If you want to change it.

We copy some files in one directory:
cp file1 file2 file3 /var/www/backup

It can also copy all of the files is:
cp * /var/www/backup

This only applies to files, folders not included.

Or more complete again with all the directories and their contents, this need recursion:
cp -R * /var/www/backup

Hopefully it can help and facilitate your understanding to the use of Linux.

Click here for Comments