GagA// 0n D nEt

It is currently Sun May 20, 2018 3:32 pm

All times are UTC




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Linux: Tar extract file to a specific folder/directory
PostPosted: Wed Mar 25, 2009 12:30 pm 
Offline

Joined: Wed Jul 18, 2007 1:14 am
Posts: 181
You may find the need to extract a given tar file to a different folder besides the current working directory of yours.

You can get this done with the following syntax:
Code:
tar -xf compressed.file.tar -C /path/to/extract

So in case I want to extract a file news.html.tar located under /usr/src to /home/newsflash folder, then I would use the following command:
Quote:
[[email protected] ~]# tar -xf /usr/src/news.html.tar -C /home/newsflash


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group