Offbeat

Unix: Impossible File Types

July 1, 2009, 02:27 PM — 

Given the plethora of file types showing up on file servers today, the very idea of an "impossible" file type is hard to grasp. What would make a file type impossible after all? Would it defy classification by the file system? Would it have a negative length? "Unknown file type" I could understand. Impossible takes an extra stretch of the imagination.

I came across dozens of these messages while examining the contents of a tar file with "tar tvf". The files inside the tar file were not particularly offensive. Most were Sparc executables (ELF 32-bit MSB executable SPARC32PLUS Version 1) or directories. Some of the "tar: impossible file type" messages showed up succession with no intervening TOC data on the files themselves, making it very hard to determine which of the files or directories tar was finding so incredulous.

tar: impossible file typetar: impossible file typetar: impossible file typetar: impossible
file typetar: impossible file typetar: impossible file typetar: impossible file typetar:
impossible file typetar: impossible file typetar: impossible file typetar: impossible file
typetar: impossible file typetar: impossible file type

After a bit of checking, it appears that errors such as these are associated with a bug in OpenSolaris -- a bug associated with long file names. While the tar command is supposed to handle file names as long as 100 characters, it seems that the command in some version of OpenSolaris balks or did balk if the length of filenames exceeded 98 characters. In my case, the longest filename was only 80 characters long and the OS was Solaris 9. And a "tar tvf" command on the very same tar file on Solaris 10 showed no signs of problems with file types or file name lengths.

Fortunately, the odd errors seem to have no more effect than to puzzle the sysadmin who is checking the contents of a tar file before extracting it. As the files were being extracted, no complaints about file types were issued and all files extracted properly.

The moral of the story is that you're never too old for an error you've never seen before and bugs exist even in some of the most well behaved operating systems. This one I'd never seen before and am still puzzling over.

Even if the files in my tar file somehow managed to become part of a tar file with names (paths and all) longer than 98 or 100 characters, "impossible file type" would be a very strange way to express the problem. With file names (including paths) of less than 80 characters, these errors are quite mysterious.

If you've seen this same behavior or have similar strange encounters with errors of the third kind, I'd love to hear from you.

Sign up for ITworld's Daily newsletter
Follow ITworld on Twitter @IT_world

I like it!
Comments

strange file types

Always take unix error messages with a pinch of salt. There is so much functionality in the latest versions, I wonder just how much testing goes in to each and every product. Rgds Vince
| reply

Ah, yeah

Solaris' tar sucks, and has for many years. Try GNU tar.
| reply
peer-to-peer

jfruh
Apple syncing patent can't come soon enough

pasmith
New Twitter features borrow from 3rd party clients

Esther Schindler
Open Source Changes the Software Acquisition Process

mikelgan
How to set up continuous podcast play on the new iTunes

David Strom
Five important Windows 7 mobility features

sjvn
Guard your Wi-Fi for your own sake                        

Sandra Henry-Stocker
Grepping on Whole Words

 

Sidekick: The Good News & the Bad News
Either way you look at it Microsoft Data Center management did not follow standards or best practices in this failure. In which case it makes me wonder more about the outsourcing of corporate data much less personal data.
- mburton325

Join the conversation here

The Daily Tip

The Daily TipQuick, practical advice for IT pros. Made fresh daily.

Hot tips:

Want to cash in on your IT savvy? Send your tip to tips@itworld.com. If we post it, we'll send you a $25 Amazon e-gift card.

Newsletters

Subscribe to ITWORLD TODAY and receive the latest IT news and analysis.

I would like to receive offers via email from ITworld partners.
By clicking submit you agree to the terms and conditions outlined in ITworld's privacy policy.
Featured Sponsor

AISO founders envisioned a Web hosting company that was environmentally friendly. While the company employed energy-efficient innovations like solar panels, its infrastructure produced unacceptable power and cooling requirements. Find out how AISO leveraged AMD technology to overcome their challenge in this case study white paper.

In this whitepaper, Scalar explores the opportunity to change the landscape with respect to mission critical databases built around Oracle. Leveraging technologies such as Linux, high-end commodity processing power and Oracle RAC technology to architect, design, build and maintain database infrastructure that delivers maximum availability, reliability and performance at a fraction of traditional cost.

On a typical day, weather.com, the Web site for The Weather Channel in Atlanta, serves up between 15 million and 20 million page views. But in September 2004, when back-to-back hurricanes ransacked Florida, the peak traffic on one day more than tripled: over 70 million page views by more than 7 million unique visitors. Read the full success story now.

Marketplace