- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- tar - exit code 5 ???
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2002 02:34 AM
03-11-2002 02:34 AM
How can I get detailed error destription about tar exit code 5 ?
Why my tar cvf /dev/rmt/0mn `cat files.txt` ends with error number 5 ???
Reasons exit(5):
tar: Cannot change directory to '%s'
tar: Path '%s' skipped
tar: cannot open %s
Missing links to %s
tar: %s: cannot access file
tar: Out of memory. Cannot detect symbolic link loops
tar: Loop of symbolic links detected, tar terminated
tar: cannot stat %s. Not dumped.
tar: Size of %s > %s. Not dumped.
tar: %s: directory read error
tar: %s: directory read error
tar: %s: symbolic link too long
tar: can't read symbolic link
tar: %s: cannot open file
tar: %s: link to name too long
Out of memory. Link information lost
%s: file changed size
tar: %s is not a file. Not dumped
tar: %s: symbolic link failed
%s: cannot link
tar: %s couldn't create character device
tar: %s couldn't create block device
tar: %s couldn't create fifo
tar: %s couldn't create directory
tar: %s couldn't create directory
tar: %s - cannot create
tar: chmod failed
tar: chown failed
tar: couldn't get uname for uid %d
tar: couldn't get gname for gid %d
tar: pwd failed
tar: %s: pathname too long
tar: %s: prefix too long
tar: %s: file name too long
%s: file name too long
KRI
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2002 02:41 AM
03-11-2002 02:41 AM
Re: tar - exit code 5 ???
you use command substitution for your tar input, which only works, if the output is a list of files.
try the following command instead:
cd /path_to_desired_directory_whith_file.txt
tar cvf /dev/rmt/0mn file.txt
this should work...
Allways stay on the bright side of life!
Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2002 03:05 AM
03-11-2002 03:05 AM
Re: tar - exit code 5 ???
Can you post the output of "cat files.txt"?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2002 03:07 AM
03-11-2002 03:07 AM
Re: tar - exit code 5 ???
files.txt contains list of files to archive.
I want to find decrtiption about tar exit code 5.
Example 1:
> tar cvf /dev/rmt/0mn `cat files.txt`
:
a /tmp/AAAa16909.TMP 16291 blocks
a /tmp/AAAa17203.TMP 811 blocks
a /tmp/AAAa19393.TMP 308 blocks
a /tmp/AAAa21440.TMP 811 blocks
> echo $?
5
Example 2:
> tar cvf /dev/null `cat files.txt`
:
a /tmp/AAAa16909.TMP 16291 blocks
a /tmp/AAAa17203.TMP 811 blocks
a /tmp/AAAa19393.TMP 308 blocks
a /tmp/AAAa21440.TMP 811 blocks
> echo $?
5
What means 5 ???
KRI
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2002 03:14 AM
03-11-2002 03:14 AM
Solution'man errno' also tells you that EIO is "I/O error - some physical I/O error. This error may in some cases occur on a call following the one to which it actually applies."
Its a very general error message, though. Is the tar you are getting valid? As in, does "tar xvf

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2002 03:30 AM
03-11-2002 03:30 AM
Re: tar - exit code 5 ???
Tar codes
exit(0)
no error & no warning.
exit(1)
Tar: cannot create temporary file (%s)
Invalid blocksize. (Max %d)
tar: blocksize %d too big, can't get memory
tar:Invalid or non-existent device file %s
Can only create standard output archives
tar: cannot open %s
tar: option not supported for this device %s
tar: cannot write to %s: write protected
tar: usage tar [-]{txruc}[eONvVwAfblhm{op}][0-7[lmh]] ......
Attempt to create archive of no files. Nothing dumped.
tar: cannot preserve extent attributes for %s. aborting...
Tar: cannot create temporary file (%s)
Invalid blocksize. (Max %d)
tar: blocksize %d too big, can't get memory
tar:Invalid or non-existent device file %s
Can only create standard output archives
exit(2)
directory checksum error
tar: %s: HELP - extract write error
tar: Cannot close %s
Tar: tape write error
exit(3)
Tar: tape read error
Tar: tape blocksize error
Tar: blocksize = 0; broken pipe?
Tar: error! blocksize changed
exit(4)
Tar: tape backspace error
Tar: ioctl to write filemarks failed (%d). aborting...
Tar: ioctl to determine device online failed. aborting...
exit(5)
tar: Cannot change directory to '%s'
tar: Path '%s' skipped
tar: cannot open %s
Missing links to %s
tar: %s: cannot access file
tar: Out of memory. Cannot detect symbolic link loops
tar: Loop of symbolic links detected, tar terminated
tar: cannot stat %s. Not dumped.
tar: Size of %s > %s. Not dumped.
tar: %s: directory read error
tar: %s: directory read error
tar: %s: symbolic link too long
tar: can't read symbolic link
tar: %s: cannot open file
tar: %s: link to name too long
Out of memory. Link information lost
%s: file changed size
tar: %s is not a file. Not dumped
tar: %s: symbolic link failed
%s: cannot link
tar: %s couldn't create character device
tar: %s couldn't create block device
tar: %s couldn't create fifo
tar: %s couldn't create directory
tar: %s couldn't create directory
tar: %s - cannot create
tar: chmod failed
tar: chown failed
tar: couldn't get uname for uid %d
tar: couldn't get gname for gid %d
tar: pwd failed
tar: %s: pathname too long
tar: %s: prefix too long
tar: %s: file name too long
%s: file name too long
NOTE: exit code is condsidered as 'NONFATAL_ERRCODE'
Paula
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2002 03:39 AM
03-11-2002 03:39 AM
Re: tar - exit code 5 ???
is it possible, that the output of your command line is longer than 1024 characters alltogether? This would cause an error like described, because your total lenght of command line is limited!
Check the same command with a shorter input file and see if it works.
Allways stay on the bright side of life!
Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2002 04:11 AM
03-11-2002 04:11 AM
Re: tar - exit code 5 ???
One of files, listed in files.txt (files.txt contains 16823 files), have incorect uid/gid !
Look:
a KSI/archiv/65CILB49000ER1-COP 8477 blocks
[my comment] 0 - error code
tar: KSI/archiv/ls.txt: cannot open file
[my comment] 5 - error code
-rw-rw-rw- 1 ksimail ksimail 4340120 GRU 17 12:47 /u/ksimail/KSI/archiv/65CILB49000ER1-COP
-rw------- 1 root sys 10570521 GRU 21 09:47 /u/ksimail/KSI/archiv/ls.txt
This is a problem. This was a problem !
Thx !
KRI
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2002 04:23 AM
03-11-2002 04:23 AM
Re: tar - exit code 5 ???
Incorrect UID/GID
Check you passwd / group files for duplicates.
Paula