backups

File Backups

tar -cvf linux_notes.tar notes*.txt

tar – the name of the program
c – create
v – verbose – show what files they are
f – file – make a file – should always be the last option)
linux_notes.tar – the name of the backup
notes*.txt – the files you want to backup

*.*. – backups all the files in the directory

gzip linux_notes.tar – makes a compressed file called linux_notes.tar.gz
tar -czvf bob_backup.tar.gz * – makes a backup and compressed file called bob_backup.tar.gz

tar -zxvpf linux_notes.tar.gz – this unzips the linux_notes.tar.gz file
z – unzip the file first
x – extract the files from the tarball
v – verbose – tar tells you what files it’s extracting)
p – preserves dates, permissions of the original files
f – use the file in question (if you don’t specify this, tar just sort of sits around doing nothing)