extracting tar.gz command
hi,
I have downaded a tar.gz file in my Fedora box.To extract the command i use Code:
# tar xvfz /home/smith/foo.tar.gz example:- foo.tar.gz By default it save in /root folder. I want that after extracting it save in /home/smith folder.I try the command it it not works. # tar xvfz /home/smith/foo.tar.gz /home/smith/ Kindly guide me that how can i save it in /home/smith folder. thanks gardenair |
Hi,
The archive is extracted in the directory you were when you ran the tar command. I guess it wasn't /home/user since you used a full path. You can use the -C option to extract the archive where you want: Code:
tar zxvf /home/foo.tar.gz -C /some/other/directory |
That command will output the contents to the current working directory.
So, for example, if you're in directory /first/directory, and then execute the command above, the output will be in /first/directory, not in /home/. You can use tar's -C option to output the contents to some specific place. |
Thanks "bathory". to solve my issue.:hattip:
|
All times are GMT -5. The time now is 01:06 PM. |