2010/08/13

Simple file backup

cp - Copy files and stuff; since tar and rsync are sometimes overkill.
    This is, by far, the simplest way to backup and archive files. Also see ln for symbolic and hard links.

BASIC
cp file backupFile
SHORTHAND - This uses a shell trick to copy file to file-backup
cp file{,-backup}
RECURSIVE
cp -r folder destination
PRESERVE - Retain file permissions, attributes, and user and group IDs (I think)
cp -p file file2
VERBOSE
cp -v file file2

No comments:

Post a Comment