LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 10-08-2007, 12:58 PM   #1
combatseabee
LQ Newbie
 
Registered: Nov 2004
Location: New England
Distribution: Fedora Core 9
Posts: 17

Rep: Reputation: 0
Losing Files


Hello,

I have a problem with files getting lost while transferring and getting a power surge the day before. What is happening is I have to transfer files from the day before to create an "End of Day." I use the Julian Date to refer to the previous date say for 10/7/07 I would use 07280 where 07 is the year and 280 is the Julian date. So when the server is transferring files at night and I get a power surge, the files are not there the next day. I need to create a script something like:

find eal*.n where n=date ...

Something like that, please help ???
 
Old 10-08-2007, 03:51 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by combatseabee View Post
So when the server is transferring files at night and I get a power surge, (..) I need to create a script
Instead of looking at the symptoms shouldn't you be looking at getting a UPS / surge filter?
 
Old 10-08-2007, 06:43 PM   #3
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Well, depending on your options, if you've got files like
eal*.n
where n= file create date, most people use the convention that n will be formatted like: YYYYMMDD.
This makes it easy to sort files at the cmd line and is also easy for people to read.
You can then simply search for files whose 'extension' is > desired date.
One option is to use rsync, which will only copy any differences it can find between the src and tgt machines::/directory.
(Will do on the fly compression and can use ssh protocol if reqd).
 
Old 10-10-2007, 11:52 AM   #4
combatseabee
LQ Newbie
 
Registered: Nov 2004
Location: New England
Distribution: Fedora Core 9
Posts: 17

Original Poster
Rep: Reputation: 0
Thank You

Thank you soooo much, I finally got a reply from someone who understands what I'm going through. This sounds more like what I'm looking for. I will look at this again and let you know what I decided and if it works. 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
Power Surge and losing files combatseabee Linux - Server 2 10-15-2007 07:25 PM
Losing files on a vfat partion royeo Linux - Newbie 3 08-23-2006 09:03 PM
installing linux without losing music and other files fakie_flip Linux - Software 1 03-27-2006 11:19 PM
redhat 9. floppy drive losing files. anvilmonkey Linux - Hardware 4 10-14-2003 05:36 PM
CDrom 'losing' files tarquin Linux - General 3 06-30-2003 11:00 AM

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

All times are GMT -5. The time now is 04:01 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