Re: dd command question
- From: pechoi@xxxxxxx
- Date: 28 May 2006 07:40:15 -0700
Robert Nichols wrote:
In article <1148659450.760599.234810@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,Correct me if I am wrong. tar command will give different file
<pechoi@xxxxxxx> wrote:
:Ok, can I create image files based on dir? like files in dir1/dir2 and
:dir1/dir3 to each image. If so, is that possible to dd one after
:another without losing content?
dd just copies an indvidual file or device byte-for-byte. It knows
nothing about directory structures and is the wrong tool for what you
are trying to do. You want a utility like 'tar' or 'cpio' that puts
multiple files into an archive.
To create archive files containing, respectively, everything below
/dir1/dir2 and /dir1/dir3:
cd /
tar -cf somefile.tar dir1/dir2
tar -cf anotherfile.tar dir1/dir3
To list the contents of an archive:
tar -tvf somefile.tar
To extract from the archives:
cd /
tar -xf somefile.tar
tar -xf anotherfile.tar
The tar command (and cpio, for that matter) has enough options to keep
you busy trying things for quite a long time. The tar manpage is
pretty cursory; the info page is more complete.
--
Bob Nichols AT comcast.net I am "RNichols42"
structure such as inode. I need to make 2 disks identical and prove it
somehow. That's why I was looking into dd (copying byte by byte)
command. Is there any other way to do it?
.
- Follow-Ups:
- Re: dd command question
- From: The Natural Philosopher
- Re: dd command question
- From: John-Paul Stewart
- Re: dd command question
- References:
- dd command question
- From: pechoi
- Re: dd command question
- From: Robert Nichols
- Re: dd command question
- From: pechoi
- Re: dd command question
- From: Robert Nichols
- dd command question
- Prev by Date: Re: Redhat Linux 9
- Next by Date: Network issue
- Previous by thread: Re: dd command question
- Next by thread: Re: dd command question
- Index(es):
Relevant Pages
|