I want to find a tar file which is presented in any directory and un-archive it in a one line command. I am able to find it separately from home directory. but only can extract it from directory where it is located. How can I do both in a single line using pipe?
find -name any.tar ; tar xf any.tar
I tried with this.. I can able to find this any.tar
file from any directory separately. And tar xf
is also extracting the file sparately but only in the dir where any.tar
is located. I want run both command in a single line which can find the any.tar
and extract it when the command is compiled from home directory.
I am entirely new to Unix please help me out.Thank you.