Copy files and directories



cp a.txt b.txt
cp -r x/ y/         will create y and copy all the files of x to y
cp -r x/ y/         will create y/x and copy all the files of x into y/x

cp -i               will ask for confirmation before overwriting files

cp a.txt b.txt      sets current date
cp -p a.txt c.txt   preserves date