I have a tarball (x.tar) in home/sermet directory. When I'm in different directory on terminal like, /opt#, I want to untar the x.tar in its current directory (home/sermet). How can I perform it?

2 Answers 2

tar xvf /home/sermet/x.tar /home/sermet/

Mind you this will mess up your /home/sermet/ if the tar has not got subdirectories in it.


Wherever you be

tar -xf /home/sermet/x.tar -C /home/sermet/

That will extract x.tar in your home.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .