For UNIX systems, return code 2 is "No such file or directory" or "File not found", depending on the OS.
This information is found in the /usr/include/errno.h on most UNIX systems (or wherever your version of UNIX stores the programming include files). Most programs will exit with a failure code from this file and looking up the value of the error number in the file will get you back to the reason for the failure. In the example presented, lines 5 and 6, the "No such file ore directory" messages, are probably the cause of the error number 2 return code. The reason that it reported those errors rather than the earlier messages about "Function not implemented" (which is probably error code 22 - invalid argument), is either that error code 22 is a less serious event than error code 2 to the program, or tar is designed to report the last error code encountered. Hope that helps clarify the admittedly cryptic error messages. Thanks, Donald L. (Don) Ritchey Information Technology Exelon Corporation -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 24, 2005 4:08 PM To: AMANDA users Subject: Re: tar returned 2 error??? On Wed, Aug 24, 2005 at 02:59:03PM -0400, Jean-Francois Malouin wrote: > Hi, > > In the last few days I've been getting this error: > > [/usr/freeware/bin/tar returned 2] Return code (exit status) 2 seems, I think, to be reserved by tar for non-fatal situations from which it can continue doing its archive. Gnutar reports the file caused problems and sets a flag that causes an exit status of 2 when it gets to the normal end point. ... > sendsize[133766]: time 9395.075: /usr/freeware/bin/tar: ./dev/fd: Cannot > savedir: Function not implemented > sendsize[133766]: time 9458.503: /usr/freeware/bin/tar: ./dev/fd: Warning: > Cannot savedir: Function not implemented > sendsize[133766]: time 9477.462: /usr/freeware/bin/tar: ./dev/entropy: socket > ignored > sendsize[133766]: time 9479.274: /usr/freeware/bin/tar: ./opt/prngd/egd-pool: > socket ignored > sendsize[133766]: time 9550.026: /usr/freeware/bin/tar: > ./var/spool/pbs/server_priv/jobs/70085.shado.JB: Warning: Cannot stat: No > such file or directory > sendsize[133766]: time 9550.034: /usr/freeware/bin/tar: > ./var/spool/pbs/server_priv/jobs/70085.shado.SC: Warning: Cannot stat: No > such file or directory > sendsize[133766]: time 9551.503: Total bytes written: 3056629760 (2.8GB, > 18MB/s) > sendsize[133766]: time 9551.510: /usr/freeware/bin/tar: Error exit delayed > from previous errors > sendsize[133766]: time 9551.510: ..... ... > > > Any clue? Looks to me like: Some devices, sockets and whatever fd is (file descriptor, floppy disk, ???) could not be handled by tar and two temporary spool files existed when tar looked at the directory listing but had already disappeared when tar tried to get their size, ownership, ... Maybe some exclude's are needed? -- Jon H. LaBadie [EMAIL PROTECTED] JG Computing 4455 Province Line Road (609) 252-0159 Princeton, NJ 08540-4322 (609) 683-7220 (fax) ************************************************************************ This e-mail and any of its attachments may contain Exelon Corporation proprietary information, which is privileged, confidential, or subject to copyright belonging to the Exelon Corporation family of Companies. This e-mail is intended solely for the use of the individual or entity to which it is addressed. If you are not the intended recipient of this e-mail, you are hereby notified that any dissemination, distribution, copying, or action taken in relation to the contents of and attachments to this e-mail is strictly prohibited and may be unlawful. If you have received this e-mail in error, please notify the sender immediately and permanently delete the original and any copy of this e-mail and any printout. Thank You. ************************************************************************