Ubuntu – “Cannot open: No such file or directory” when extracting a tar file

tar

I am trying to install Apache Cassandra that is a tar.gz file. The following is the output I am getting.

1st instance:

tar -zxvf apache-cassandra-2.0.3-bin.tar.gz
tar (child): apache-cassandra-2.0.3-bin.tar.gz: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now

2nd instance:

tar -zxvf apache-cassandra-2.0.3-bin.tar.gz.gitignore
tar (child): apache-cassandra-2.0.3-bin.tar.gz.gitignore: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now

What to do?
The files I need to install are in a disk and not copied to the machine. Does that matter?

Best Answer

Reason for your problem is in the error report.

Cannot open: No such file or directory

cded into the directory on which the apache-cassandra-2.0.3-bin.tar.gz file is located and then run the below command to extract it's content.

tar -zxvf filename.tar.gz   # Replace the filename with your's
Related Question