jQuery in Action, 3rd edition
The moose likes Linux / UNIX and the fly likes Unix Shell Script to archive file with time bound - random access file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "Unix Shell Script to archive file with time bound - random access file" Watch "Unix Shell Script to archive file with time bound - random access file" New topic
Author

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

ravi v kumar
Ranch Hand

Joined: Dec 14, 2004
Posts: 56
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

Joined: Jun 25, 2001
Posts: 17168
    
  27

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.


An IDE is no substitute for an Intelligent Developer.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Unix Shell Script to archive file with time bound - random access file
 
jQuery in Action, 3rd edition