Recover a corrupted gz

Writing by on Wednesday, 14 of October , 2015 at 7:13 am

Sometimes you might be able to salvage a corrupted gzip. Typically this trick always works on most log files.

$ gunzip corrupted.gz
gunzip: corrupted.gz: unexpected end of file
gunzip: corrupted.gz: uncompress failed

Use the -c option that outputs to console, but redirect to a new salvaged file. Then gzip the salvaged file to recover it.

$ gunzip -c corrupted.gz > salvaged
$ gzip salvaged

You can now delete the corrupted gz file and use the salvaged version.

Leave a comment

Category: Linux,Tips and Tricks

Backpacking Grand Canyon Rim to Rim

Writing by on Monday, 12 of October , 2015 at 8:47 pm

On Thu Oct 8, 2015 my wife and I set out on the grandest hike from the South Rim to North Rim of the Grand Canyon. It was a 3 day hike with 2 stops at Bright Angel and Cottonwood campgrounds. It was an amazing experience and a remarkable hike with spectacular views throughout. We had our camping permits and reservations at Yavapai Lodge on Wed Oct 7 and Sat Oct 10. So couple of friends, my wife and I flew from San Jose to Flagstaff on Wed Oct 7 and rented a car and reached the Grand Canyon National Park around 14:00. We checked into Yavapai Lodge stretched out a bit and went straight to the visitors center and spent some time at Mather Point for our first view of the Grand Canyon in all its glory. After an hour we took a shuttle and went to Hopi Point to see the Sunset. We stopped by Bright Angel Lodge for a beer and our last real meal before our hike. Headed back to the lodge and went to bed. It was chilly night and we were anxious.

Thu Oct 8, 2015. GOAL: Reach the bottom (7 miles) by 14:00, set camp and Phantom Ranch for beer.
Backpacks packed. Check out of Yavapai Lodge. Extra stuff in the car. Quick breakfast at Yavapai Lodge Canyon Cafe and we were on the shuttle to South Kaibab Trailhead. Took some photos with friends and bid them farewell until Saturday night! At 09:45 the descent had started and marked the start of a fabulous journey through the Canyon. Instantly we were welcomed with spectacular views of the Canyon. First stop Ooh Aah Point for photos. We continued and waited for a mule train to pass when I asked the Rangers if they had stocked enough supply of Beer – Affirmative. Awesome! Next stop Cedar Ridge. Stretched out a little and we were off. We went passed Skeleton Point and stopped for lunch (PBJ sandwich) when we saw two mule trains. Tip Off Point was next and what seemed to be 1.4 miles felt a lot longer and we were starting to get weary. Finally we saw the Colorado River and gave us glimmer of reaching our goal. We crossed the bridge and made it to Bright Angel Campground around 14:00. It was hot – 90F. Picked a campsite by the creek, set camp and went to Phantom Ranch which felt like a long walk in the sun. Phantom Ranch closes at 16:00 and reopens at 20:00. The mules stock the supplies there. We were lucky there was one Steak Dinner and one Veg Dinner slot available. Reserved! After beer and lemonade, we went back to camp and freshened up at the creek and went back for Dinner and then the Ranger program at 19:30 and called it a night!

Fri Oct 9, 2015. GOAL: Reach Cottonwood by 14:00 and set camp.
Granola Blueberries for breakfast. Broke Camp at 08:00 and we were on our way at 08:15.
A beautiful easy 3 hour hike on the North Kaibab Trail through the valley along the creek with picturesque views takes you towards Ribbon Falls. The sun shines bright and it gets hotter and we’re at the Fork – Ribbon Falls or Cottonwood Campground. After some arguing with the wife (who typically always wins), she made us walk towards Ribbon Falls with our backpacks. We crossed the bridge and somehow found it although the trail seemed sequestered. There she went up the falls while I stayed at the bottom grouchy as I washed my face with the cold water from the falls. Around 13:00 we left for Cottonwood as the trail started getting steeper and the sun getting hotter. After what seemed terribly long with temps hitting the upper 90s, we arrived at 14:20. We picked a campsite (the few shady sites were taken) and made lunch (Backpackers Pantry) Pad-Thai! Then cooled off near the river. I had to just jump in. Washed my t-shirt and left it to dry. We hung out at the picnic tables to cool off and get some shade from the sun. Made dinner (Chana Masala) and desert (Raspberry Crumble) at 17:30 set our alarms and went to bed by 19:00. We had an early start the next morning.

Sat Oct 10, 2015. GOAL: Start at Dawn. Reach Trailhead by 12:30 and look for Trans Canyon Shuttle.
We were awake by 04:00 even before the alarms went off. Mentally preparing ourselves for the 7 mile climb up the North Kaibab Trail we stumbled out by 04:45. Made breakfast and broke camp at 05:45, used the toilets freshened up and we were on our way at 06:15. We had to get up before 14:00 when the Trans Canyon Shuttle left North Rim for South Rim and my wife knew she wouldn’t win with any pit stops at Roaring Springs today. We hurried past Pumphouse Ranger Station which arrived at 06:50 sooner than anticipated and then came to the Roaring Springs fork. We were making good progress but trail wasn’t all that steep yet. We skipped Roaring Springs (we had water) and continued on the trail as the sun was rising past the walls of the Canyon. The trail was getting steep and fatigue began to settle in. We were going to take a break at Supai Tunnel but it seemed like an eternity. Nowhere in site, we passed the bridge and carried on each step getting us closer. We rested for a bit and continued and finally saw a tunnel. Voila! We were at Supai Tunnel at 09:30 and took off our heavy packs and just sat resting, eating and drinking water. At 10:05 we were going for the final push 1.7 miles to the finish. The match was in the fifth set! We were making our way through the unforgiving steps of North Kaibab where the backpack seems to get heavier with every step and the mind starts playing games. Then we were greeted by Coconino Overlook a magnificient view of the South Rim and the beautiful canyon where we rested for photos. At 10:50 we left for the trail head and finally after weathering through, our legs weary, our feet blistery, we reached the trail-head at 11:25. We had done it! The Grandest Hike! We spent some time there recuperating and then with no sign of any Park Shuttles we walked to the Campground and then got a beer and took a shuttle to Grand Canyon Lodge at the North Rim. We ate at the deli and took the Trans Canyon Shuttle back to South Rim and checked in at Yavapai Lodge at 19:00. After a well deserved good shower we met our friends at the Grand Canyon Cafe at Yavapai Lodge for Dinner to share stories of our grand experience.

Final Comments
Pack that backpack carefully. Take only what you will need. Ask for the weather report at Phantom Ranch & Cottonwood at your lodge. We took 2 jackets and thermals that we didn’t need. We didn’t need the water filter and carried more food/snacks than necessary. In the end, to witness the magnificent natural wonder up close and personal and a tremendous sense of accomplishment this makes it one of the grandest hikes of all time!

Leave a comment

Category: Travel

Shivdev Kalambi's Blog

Shivdev Kalambi is a Software Development Manager, previously a Principal Software Engineer at ArcSight/HP. With over 16 years' experience in software development, he's worked on several technologies and played different roles and contributed to all phases of projects. Non-tech activies include Ping-pong, Rock Climbing and Yoga at PG, Golf, Skiing, Swimming & a beer enthusiast.