Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

tar -tvf is truncating anything more than 100 characters

Status
Not open for further replies.

oraytektips

Programmer
Jul 1, 2005
65
0
0
US
Hi - When I do a tar -tvf filename.tar, it is only showing path names upto 100 characters.Is there anyway around this.
Thx
 
I think this is due to a limitation in tar command!

Code:
The tar command looks for archives on the default device (usually tape), unless you specify another device with the -f Archive flag. 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.

Why don't you try to compress files using backup and restore commands?

find ./source_path -print | backup -iqvpf backup_file.arc
restore -tqvf backup_file.arc

Regards,
Khalid
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top