Showing posts with label bash. Show all posts
Showing posts with label bash. Show all posts

Friday, June 7, 2013

compressing file from the command line and adding the date of creation to it


You need to use tar command as follows (syntax of tar command):
tar -zcvf LC52_`date +%b%d-%y`.tag.gz data/


Where,
  • -z: Compress archive using gzip program
  • -c: Create archive
  • -v: Verbose i.e display progress while creating archive
  • -f: Archive File name
  • -x: Extract files
source: link for compresing and link for date on file 1, 2