![]() |
IT
- architect |
![]() |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| please select your language | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
28/11/06Too much good leads to bad (part 2)I wrote why too much tricks could leads to unexpected behaviors here. Facing some corrupted tar archive, some requirements are needed in order to repair them successfully:
Given my affinity for perl the choice was obvious. In fact perl fits pretty well in strings processing (scoop). #define TBLOCK 512 /* length of tar header and data blocks */ For the record I 'll put my code in a simplify version. Through trial&error it is necessary to expand the regular expression section to match all intruders.
my $file=$ARGV[0]; open (FH,"<$file") or die "Couldn't open file $file\n"; until ( eof(FH)){ On a last note, I would recommend using star as an improved version over many tar implementation including GNU tar and stock Solaris version.
Categories: , Solaris, 08:46:47 am274 words
Too much good leads to badEach cook knows it for sure, don't follow the "too much" path if you want to succeed. This rule can although be applied to computer. Take UNIX, it is a real cool OS. You can do art on the command line, piping tools together, using complex regular expression,... As a technogeek working on leading edge projects it might be ok but as sysadmin for a bank it is probably plain wrong. Just keep things simple. What's wrong with tar, gzip and nohup tar is used to create archive. It is a very usefull utility, well known and in UNIX for years. If you want to create an archive you provide a filename or a device where it will be create. After that you can compress it with gzip to save some space. Supposed you want to archive a lot of files, depending on I/O performance it can take hours. It is then a good practice to use nohup to stay imune to HUP signal. Put this 2 lines (tar and gzip) in a script, start it with nohup and you are fine...
Categories: , Solaris, 08:05:31 am359 words
certifiedThe result arrived over the weekend and guess what I
Categories: , Solaris, 07:58:04 am113 words
|
cultural exception
SearchArchives
Syndicate this blog
What is RSS?
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||