I wish to extract
ls -ltr /tmp/moht/104.tar
-rwxrwxr-x 1 meadmin meadmin 933498880 Jan 5 07:03 /tmp/moht/104.tar
I tried the below commands, but it does not extract to
It does not even print any output for extraction despite me using the
-v option with
Below is everything I tried.
tar -xvf 104.tar --directory /tmp/moht/
tar -zvxf 104.tar --directory /tmp/moht/
tar -zvxf 104.tar -C /tmp/moht/
tar -jvxf 104.tar -C /tmp/moht/
cd /tmp/moht and fire this command
tar -xf 104.tar then the files get extracted alright.
I'm using Sun Solaris Sparc. I do not wish to cd but give absolute path for both the tar file as well as the destination. I am not using GNU tar, but the tar that comes with Solaris.
This will be a part of a script so all the filenames and paths will be changed to variables; hence my requirement is very specific. Can you please suggest?