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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

tar exit codes

Status
Not open for further replies.

alan147

Technical User
Nov 15, 2002
128
GB
Good morning

I have inherited a backup script that uses tar to dump the data to tape. Whoever wrote the script put in error checking at various stages without any explanation as to the meaning of the exit codes. Does anyone know what exit code 2 means specifically and is there a general list of the exit codes. The man pages are not much use anything greater than 0 means an error has occured.


Thanks

Alan [ponder]
 
If the author of the script has coded exit 2, exit 99 etc
then most likely, those return values are being checked elsewhere ( in calling scripts ?)
HTH Dickie Bird (:)-)))
 
Dickie

Thanks very much.

I have examined the tar log and the directory being backed up, in there there is a file with the name ^[[3~ which should not be there. However I cannot get rid of it, it will not be moved, copied or deleted. It's just a guess but I wonder if this rouge is causing my error. Do you have any idea how to get rid of it?

Alan
 
That name appears to be part of a command with regex, that was aborted. Try 'escaping' the ^,[ and ~characters ie:
rm \^\[\[3\~
or use rm -i to prompt you for each delete ie
rm -i *3*

HTH Dickie Bird (:)-)))
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top