LinuxQuestions.org
Review your favorite Linux distribution.
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 11-09-2008, 12:53 AM   #1
v_t_long
LQ Newbie
 
Registered: Nov 2008
Posts: 1

Rep: Reputation: 0
Question How to create a tar without input filename


Hi,

I would like to run this command to "ghost" my partition onto multiple volume of 4G so I can burn on multiple DVD

ntfsclone -s -o - /dev/sda2 | tar -L 4000000000 -M -czf disk-image.img.gz

But tar requires that a file name is given to create a tar.

Is there a way to create a tar without input file name?

Thanks !!!
 
Old 11-09-2008, 08:13 AM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
The tar command allows you to use the "-" as shorthand for standard in (stdin) or standard out (stdout) depending on whether you are using it for input or output.

People commonly use this for creating a "tar pipeline".

A good example of this usage is found at this link:
http://www.linux.com/articles/54053

Quote:
The second main use of tar is in copying data around. If I need to move whole directories with good performance while preserving all permissions and attributes, I use a two-stage tar pipeline:

tar cflp - .|(cd $dest;tar xfp)

This creates a tar archive and sends it to stdout. The second stage creates a subshell that moves to the destination directory and extracts the archive from stdin. This same principle can be used over the network as well. This is immensely useful for creating backups of directories when making major changes, or copying data to a more accessible location to manipulate it.
You could adapt this pipeline usage for your purposes.
 
  


Reply

Tags
tar


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
How to create .diff.gz/.dsc/.orig.tar.gz from a downloaded tar.gz application? frenchn00b Linux - General 4 05-18-2008 09:09 AM
getting error during "tar -xvzf filename.tar.gz" b0nd Linux - Newbie 11 04-23-2005 08:50 PM
How can i create filename using interger with gnu C++? cash_05 Programming 6 09-12-2003 11:22 PM
extracting -filename.tar.gz- zokter Linux - Newbie 3 06-29-2003 06:18 AM
Untar filename.tar.tar Dr.Swing Linux - Newbie 12 09-27-2002 07:10 AM

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

All times are GMT -5. The time now is 01:00 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