LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Blogs > anky.parmar1786
User Name
Password

Notices

Rate this Entry

How to tar files through scripting?

Posted 05-12-2012 at 10:02 AM by anky.parmar1786

I am newbie in scripting. Made a script but not executing properly. I want to take tar backup of files of first 15 days of the month that is 1st to 15th May. Files are in this format -->> 01May2012 to 15May2012

The script is given below.. Please help me to make this correct

today=`date '+%d%B%Y' -d '-11days'`
cd /opt/Server.Log_11Ocg01
tar -cvf backups1to11.tar /opt/Server.Log_11Ocg01/$today

Thanks
Ankit
Posted in Uncategorized
Views 384 Comments 0
« Prev     Main     Next »
Total Comments 0

Comments

 

  



All times are GMT -5. The time now is 07:50 AM.

Main Menu

My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration