cp prog.c prog.bak
To copy a file in your current directory into another directory, enter:
cp jones /home/nick/clients
To copy all the files in a directory to a new directory, enter:
cp /home/janet/clients/* /home/nick/customersTo copy a directory, including all its files and subdirectories, to another directory, enter:
cp -R /home/nick/clients /home/nick/customers
To use pattern-matching characters to copy files, enter:
cp programs/*.c .
This copies the files in the programs directory that end with .c to the
current directory, signified by the single . (dot). You must type a
space between the c and the final dot.
没有评论:
发表评论