I have a tar file and I need to extract a single file from it and put it to another directory.
I tried this but it gives an error message. It did extract the file but not to the directory that I want but it extracted the file to the same directory.
tar xvf tarfile.tar -C /home/myDir filename_tobe_extracted
The error is:
x filename_tobe_extracted, 4046 bytes, 8 media blocks. File -C not present in the archive. File /home/myDir not present in the archive.