Removal of hashed files

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
asorrell
Posts: 1707
Joined: Fri Apr 04, 2003 2:00 pm
Location: Colleyville, Texas

Post by asorrell »

As you can see, it can be hard to automate a delete because some of the sub-files were created or updated at different times. And you are correct in assuming that the find command would cause problems by leaving "stragglers".

There's not an easy solution I'm aware of to tell UNIX to "remove this directory if everything in it is older that 180 days, and leave everything alone otherwise".

No matter what method you use, I recommend the following:

1) Remove the entire "filename" directory and all its sub-files.
2) Delete the matching dictionary (D_filename).
Last edited by asorrell on Tue Apr 15, 2014 2:29 pm, edited 1 time in total.
Andy Sorrell
Certified DataStage Consultant
IBM Analytics Champion 2009 - 2020
pk7
Participant
Posts: 44
Joined: Fri Aug 03, 2007 8:35 am
Location: Kansas CIty

Post by pk7 »

Thanks Andy

But even so, ALL the DATA.30 files (dozens of them in different directories) have exactly the same recent date and time. There is no way that they were all updated at the same time, especially in a Development environment where I know for certain that some of these hashed files have not been touched in years! Yet they have this recent date. I don't know why that is but I suspect that we can delete these files despite the recent date. But we need to know that the data in them has not been touched recently.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

From what I recall those timestamps can be updated when the hashed file is read / accessed, not just when content changes happen.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply