linux command cp.

Examples

cp file1.txt newdir

Copies the file1.txt in the current directory to the newdir subdirectory.

cp /home/public_html/mylog.txt /home/public_html/backup/mylog.bak

Copies the file mylog.txt in the public_html directory into the public_html/backupdirectory as mylog.bak.

cp -u *.txt newdir

Copy all files ending in .txt into the newdir directory, but only if the files do not already exist in the new directory, or if the files being copied are newer.

cp -r /home/hope/files/* /home/hope/backup

Recursively copies all the files, directories, and subdirectories in the/home/hope/files directory into the /home/hope/backup directory.

上一篇:MyEclipse导入ant项目——Java编程思想


下一篇:(转)无法打开C盘,提示"本次操作由于这台计算机的限制被取消,请与你的管理员联系”