tar不能處理長檔名

zhulch發表於2007-08-17

有朋友問tar 的時候報錯,原因可能是tar不能處理長檔名或長目錄

建議用cpio

[@more@]

錯誤資訊:

tar: 0511-190 File name remove_bak/qyhy/zhwl/qyhy/tgzn/ywlc/xywp/tgzn/tgzn/dmcx/tgzn/fgcx/tgzn/146zcfg/147tjjyjyj/tgzn/146zcfg/150tjbj/tgzn/146zcfg/199tjhg/tgzn/146zcfg/149tjszf/tgzn/146zcfg/151tjhsj/tgzn/146zcfg/tgzn/zyxz/bgxz/tgzn/zyxz/tgzn/zyxz/rjxz/tgzn/zxxz/tgzn/zxxz/ggb/zhxw/kadt/bgtj/kadt/kadt/gktt/kadt/myje/kadt/wztj/kadt/qttj/kadt/cbtj/dzsw/bsqc1/dzsw/dzsw/bsqc2/BMW730LI/dzsw/bsqc2/dzsw/b

說明:

When specifying path names that are greater than 100 characters for the United States Tape Archiver (USTAR) format, remember that the path name is composed of a prefix buffer, a / (slash), and a name buffer.

The prefix buffer can be a maximum of 155 bytes and the name buffer can hold a maximum of 100 bytes. If the path name cannot be split into these two parts by a slash, it cannot be archived. This limitation is due to the structure of the tar archive headers, and must be maintained for compliance with standards and backwards compatibility. In addition, the length of a destination for a hard or symbolic link ( the 'link name') cannot exceed 100 bytes.

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/7318139/viewspace-963875/,如需轉載,請註明出處,否則將追究法律責任。

相關文章