bug-fileutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Memory consumption with cp -l


From: Ole Tange
Subject: Re: Memory consumption with cp -l
Date: Mon, 10 Mar 2003 19:10:38 +0100 (CET)

On Mon, 10 Mar 2003, Jim Meyering wrote:

> Knowing the bit about hard links, the increased memory footprint is
> understandable.

If this will not change in the near future may I suggest you mention this
in the man-page in connection with the -l option?

> There's probably a way to save some space in cases like yours.

Correct me if I am wrong. But it seems to me that -l should never have to
remember anything. -l can be emulated with a series of mkdir followed by a
long serie of ln. None of the individual commands need any memory about
what happened before.

> If there were(is?) a way to make a hard link given only a dev/inode
> pair, we could save the destination dev/inode instead of the dest.
> file name.

The place where you need the memory is when you copy from one file system
to another and you want to preserve hardlinks. Eg: filesystem1/foo is
hardlinked to filesystem1/bar

  cp --preserve-hardlinks filesystem1/* filesystem2/


/Ole
-- 
If some genie offered you three wishes, would not your first one be,
"Tell me, please, what is it that I want the most!"
  -- Marvin Minsky in
     freenet://address@hidden/truenames//





reply via email to

[Prev in Thread] Current Thread [Next in Thread]