From: Wayne on
Eze wrote:
> I see the point of using tar in order to, say, send a whole directory
> as a single attachment file. I realize historically this "tape
> archive" utility may have been needed for some technical reasons. But
> I don't see the advantages of using tar to back up some files and copy
> them to some external storage device. Couldn't you just cp? The files
> would already been untarred...
>
> I bring this up because it has been winner or runner-up of the Linux
> Journal Readers' Choice Awards as Favorite Backup Utility for several
> years. It is also recommended as a "quick and dirty" backup tool at
> http://www.linuxquestions.org/linux/articles/Jeremys_Magazine_Articles/Quick_and_Dirty_Backups.
>
> Would someone care to shed some light?
>
> Thanks,
>
> Eze

The main reason to use tar instead of cp, is that not everything with a pathname
is a plain file. Files with holes, doors, FIFOs, hard links, etc, are usually
not handled correctly. (Some versions of "cp" have non-standard options to
handle such situations, notably Gnu, but even then it doesn't handle
everything the way you might expect.) So when copying directory trees,
cp is not good enough.

Then there's making archives for backup purposes, or for transporting a
directory tree across systems. This is difficult to do correctly with
standard utilities such as cp (although "scp" or "rsync" would work well
for many cases here). But it is easy to use something like this:

tar -czf - . |ssh user(a)host 'cd dir; tar -xzpf -'

Other archiving tools can be used such as cpio or pax. However pax is broken
on most Linux distros (it is a port from OpenBSD I think, and doesn't support
the "pax" archive format (required by POSIX/SUS/LSB), so can't handle ACLs
and/or extended attributes correctly). About the most widely supported archive
tool that does handle most things correctly is "star" by Joerg Schilling.

--
Wayne
From: Evergreen on
On comp.unix.shell, Eze <garzon.lucero(a)gmail.com> wrote:
>> I repeat: Why didn't you _try_ the two approaches?
>
> If you just _read_ my original reply you'd find the answer.
>
>> Without doing that you are going to have a great deal of difficulty
>> understanding any answers you receeve here. And your questions
>> will be annoyingly ignorant.
>
> People don't find ignorance annoying,


They do if it is the result of laziness.

(I dumped your other post to me.)


[delete]

Sid

From: Seebs on
On 2010-01-02, Evergreen <sidneylambe(a)nospam.invalid> wrote:

Eze: Don't mind this guy. Google him before you worry about his
criticisms, anyway.

-s
--
Copyright 2010, all wrongs reversed. Peter Seebach / usenet-nospam(a)seebs.net
http://www.seebs.net/log/ <-- lawsuits, religion, and funny pictures
http://en.wikipedia.org/wiki/Fair_Game_(Scientology) <-- get educated!
From: Younes Zouhair on
On 01/01/2010 10:30 PM, Eze wrote:
>> I repeat: Why didn't you _try_ the two approaches?
>
> If you just _read_ my original reply you'd find the answer.
>
>> Without doing that you are going to have a great deal of difficulty
>> understanding any answers you receeve here. And your questions
>> will be annoyingly ignorant.
>
> People don't find ignorance annoying, even in its extreme form. (There
> are exceptions, and something tells me you may fit the bill.) It is
> the perplexing combination of arrogance and ignorance that annoys
> greatly. You provide a sound example, with careless oracle-like
> statements about people you don't know which are completely off the
> mark. See, I did try the cp and tar methods (hint: "4GB"), and I don't
> just talk about the shell. And as far as I know you don't know
> anything about the shell either. Interestingly, you wrote as much as
> Karsten while providing infinitely less insight. Quite a feat!
>
>> Are you the same person who just posted a script and asked everyone
>> if it looked like it would work without even trying it?
>
> No.
>
> Your replies are and encourage off-the-topic posts. I'll leave you the
> final word as I want to go back to the shell. Have fun.

You shouldn't care about what Sidney Lambe, he's just an ignorant troll.
Most of the time he doesn't know what he's talking about.
From: Seebs on
On 2010-01-02, Younes Zouhair <poboxy(a)gmail.com> wrote:
> You shouldn't care about what Sidney Lambe, he's just an ignorant troll.
> Most of the time he doesn't know what he's talking about.

I object strongly to this characterization, on two grounds.

The first is that to be that consistently wrong, I think he'd actually
have to know a fair amount.

The second is that I think that the more conventional sorts of trolls are
going to view this as defamatory.

-s
--
Copyright 2010, all wrongs reversed. Peter Seebach / usenet-nospam(a)seebs.net
http://www.seebs.net/log/ <-- lawsuits, religion, and funny pictures
http://en.wikipedia.org/wiki/Fair_Game_(Scientology) <-- get educated!
First  |  Prev  |  Next  |  Last
Pages: 1 2 3 4 5 6 7
Prev: find files from specific date
Next: multiple scp using xargs