Does anyone know how to verify files being . I am trying to implement this using the bash shell script.
Basically I know tar allows you to set the "-w" option to prompt users and it also has the "-k" option to fail when a overwrite occurs, but I am trying to basically do the following:
1) Check if files exist
a) if they exist prompt user to overwrite
b) if they don't exist just write them.
"tar -vwkzxf My.tar.gz"
This commandline does not work how I need it to work. It is does not even execute in the correct order and it prompts the user ever time regardless if the files exist in the directory.
Does any know of a way "tar" can return an error code or failure.