File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
ravi v kumar
Ranch Hand
Posts: 56
  • 0
  • 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
 
Tim Holloway
Saloon Keeper
Pie
Posts: 17616
39
Android Eclipse IDE Linux
  • 0
  • 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