• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

Unix Shell Script to archive file with time bound - random access file

 
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I need shell script or UNIX command to archive a file in UNIX OS. this file should be archived on a weekly basis.
and also this file is randomly accessed by different applications.

Can you please provide solution for this.

Thanks in Advance!!

-Ravi
 
Bartender
Posts: 20841
125
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are several Unix archive utilities. Most common is tar, but there's also a Linux ZIP, and cpio.

I do nightly backups using tar. The actual scheduling is done by the cron utility.

The vixie cron popular on Linux is set up with a set of script folders, including /etc/cron.daily and /etc/cron.weekly, where you can place executable scripts and they will run automatically. If you prefer a different scheduling arrangement, you can add entries to the /etc/crontab file.

Also, for non-system usage, each user account can have its own crontab. The format is slightly different from the system crontab.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!