LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 08-06-2014, 12:41 AM   #1
AbrahamJose
Member
 
Registered: Feb 2006
Location: India
Posts: 167

Rep: Reputation: 31
tar and untar


Hi all friends,
I want to move all contents of a file system to a new location, due to space limitations.
I prefer a tar and untar methode, as a most safe way.
Is it possible to do it without an intermediate file
I mean tar -cv is to be directly extracted to new location.
With thanks in advance,
Abraham Jose
 
Old 08-06-2014, 01:13 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 23,225

Rep: Reputation: 7687Reputation: 7687Reputation: 7687Reputation: 7687Reputation: 7687Reputation: 7687Reputation: 7687Reputation: 7687Reputation: 7687Reputation: 7687Reputation: 7687
yes, you need to use pipe, something like this:
tar -C <source dir> -cf - . | tar -C <target dir> -xf -
 
1 members found this post helpful.
Old 08-07-2014, 05:16 AM   #3
AbrahamJose
Member
 
Registered: Feb 2006
Location: India
Posts: 167

Original Poster
Rep: Reputation: 31
Thanks a lot.
I tested and found OK.
This is what I really wanted.
 
Old 08-07-2014, 05:35 AM   #4
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7 / 8
Posts: 3,529

Rep: Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593
Is there any reason you can't use rsync?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
tar/untar over ssh chuikingman Linux - Server 6 09-08-2011 06:11 AM
[SOLVED] untar a list of tar files? volt220 Linux - General 1 01-05-2011 05:43 PM
how to untar files with tar.tar extension johnkalikavunkal Linux - General 5 07-11-2008 06:36 AM
Untar a particular directory from a tar.gz? nyheat Linux - Newbie 5 05-09-2008 10:01 AM
Untar filename.tar.tar Dr.Swing Linux - Newbie 12 09-27-2002 08:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:25 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration