Tuesday, February 20, 2007

rm *

Did someone say watch out for "rm *", may be I just didn't listen. Recently I was working on an issue where we had a failure of a script because it couldn't process an input file because of its large size. So I thought I was a smart ass and created a test folder. I moved the large input file into the test folder, backed up the large file, broke down the original file into many small chunks using split command. Then moved a single small chunk to the production zone and ran the script again. But somehow the script failed again. As the files were very critical I did not think of messing with them any more, I restored the large file as it was. Just before moving on to the next problem I though I shall remove the contents of the test folder. Hence I gave the dreaded "rm *" , It started prompting me for confirmation whether or not it should remove the file. I gave yes, yes.... Later on I just realized that I am in the production directory and all the files that I had deleted were input files to many other business critical scripts. I was helpless and I just walked away. Next day when I was in office I found many failures caused by the unavailability of input files. I really struggled contacting the main frames department to resend the input datasets, I got a few of them, but still not all. Finally with the help of my seniors I was able to restore all the files(all though the disappearance of the input files were still a mystery). Phew!! I was saved! Went unnoticed! These files were so critical that If I had been caught it would have caused an immediate termination(Well! I can say that again!).

No comments: