LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 09-28-2007, 02:55 PM   #1
packetsmacker
Member
 
Registered: Jun 2006
Posts: 68

Rep: Reputation: 15
Archiving data


I am the new guy at my consulting company. Because of that I stuck with the exciting job of archiving data for one of our clients. The process of archiving data to dvd is currently a 12 step process. I would like to take some of the steps and have a script do the work for me.

I am using OS 10.3 and i know the default shell is bash which I have some scripting skills in. I need to script the process below.

Currently there are user docs in a folder called prep. In that folder there are sub folder with assorted names and sizes. I have to look at each folder and copy it to another folder that is 4G or less so it can be burned to DVD. Here is where the fun starts. If the folder is over 4G I have to split it up into how ever many folder it takes to get it on a DVD. I have to keep file names of the ones that are split across dvds and append the correct number to the end of the file. So if there are 4 dvds i have to put 1 of 4, 2 of4, etc ... on each dvd.


Can anyone help me with this. It's kinda hard to explain. If I could just script all the file that are 4G or less into there burn folder that would save me some time.

Last edited by packetsmacker; 09-28-2007 at 03:04 PM. Reason: i didn't finish my post
 
Old 09-28-2007, 05:14 PM   #2
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
You could use the split utility.
Code:
man split
I think that you will find it is exactly what you need to split the large files.
 
Old 10-02-2007, 07:24 AM   #3
packetsmacker
Member
 
Registered: Jun 2006
Posts: 68

Original Poster
Rep: Reputation: 15
I read the man page on that command. It looks like that will get me started.

Thanks
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Archiving naveenlinux SUSE / openSUSE 6 12-04-2005 04:51 PM
Archiving Email KenGr Linux - Networking 1 06-25-2005 10:24 PM
archiving the logs ANU Linux - Software 1 11-26-2003 07:42 PM
Archiving zymurgist Linux - General 8 02-10-2003 08:21 PM
Archiving theneoprotocol General 5 01-26-2002 03:24 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:55 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration