Re: Pair-wise file operation (copy, link)

2024-08-30 Thread Yair Lenga
Sorry for delay. See below for my results (WSL/Ubunto): 1000 files: ln -sf * using xargs: clock: 1.58s, cpu: 0.27u, 0.30s * using pair-wise (Perl) clock: 0.10, cpu: 0.04u ,0.09s 1 files: ln -sf * Using xargs: clock:16.7s, cpu: 3.07u, 3.38s * Using pair-wise (Perl): clock: 0.59, cpu: 0.13u, 0.4

Re: Pair-wise file operation (copy, link)

2024-08-26 Thread Rob Landley
On 8/25/24 18:34, Glenn Golden wrote: > Since you were reporting 2 min, was wondering what your platform is and > whether there might be something else involved eating the 2 min realtime? Slowest exec I've had to deal with on a modern still-active system is mac homebrew, which was about 1/3 of a s

Re: Pair-wise file operation (copy, link)

2024-08-26 Thread Yair Lenga
good point. I'm running in a VM that is mounting NFS volume. may be part of the problems (slow exec) are related to search path/slow exec. I'll check and revert. On Sun, Aug 25, 2024, 19:34 Glenn Golden wrote: > Yair Lenga [1970-01-01 00:00:00 +]: > > > > In my case, I have to bulk-move abo

Re: Pair-wise file operation (copy, link)

2024-08-26 Thread Carl Edquist
On Sun, 25 Aug 2024, Yair Lenga wrote: In my case, I have to bulk-move about 2500 files. This is part of a recurring sync job that has to mirror an existing hierarchy into a new hierarchy with different naming rules. It takes no time to create the mapping (even in bash script, case statement

Re: Pair-wise file operation (copy, link)

2024-08-25 Thread William Bader
From: coreutils-bounces+williambader=hotmail@gnu.org on behalf of Glenn Golden Sent: Sunday, August 25, 2024 7:34 PM To: Yair Lenga Cc: P=C3=A1draig Brady ; Coreutils Subject: Re: Pair-wise file operation (copy, link) Yair Lenga [1970-01-01 00:00:00 +]: > > In my case, I have

Re: Pair-wise file operation (copy, link)

2024-08-25 Thread Glenn Golden
Yair Lenga [1970-01-01 00:00:00 +]: > > In my case, I have to bulk-move about 2500 files. This is part of a > recurring sync job that has to mirror an existing hierarchy into a new > hierarchy with different naming rules. > > It takes no time to create the mapping (even in bash script, case

Re: Pair-wise file operation (copy, link)

2024-08-25 Thread Pádraig Brady
The reduced scope does help, thanks. Note we already support --files0-from in wc, sort, du. Similarly we might support --pairs0-from in ln at least. Pairs would not be generally distributable with xargs etc. anyway as it might split a pair over invocations, so restricting to an option seems best.

Re: Pair-wise file operation (copy, link)

2024-08-25 Thread Yair Lenga
Hi Padraig, After thinking more about my use case - I can narrow it further to linking. If the 'ln' command will support pair-wise linking - it's relatively trivial to implement the cp from that point: mkdir tree ln --pair src1/file1 tree/dest1/name1 src2/file2 tree/dest2/name2 src3/file3 tree/des

Re: Pair-wise file operation (copy, link)

2024-08-25 Thread Yair Lenga
Hi. Thanks for looking into this my request. In my case, I have to bulk-move about 2500 files. This is part of a recurring sync job that has to mirror an existing hierarchy into a new hierarchy with different naming rules. It takes no time to create the mapping (even in bash script, case statemen

Re: Pair-wise file operation (copy, link)

2024-08-25 Thread Pádraig Brady
On 25/08/2024 12:39, Yair Lenga wrote: Greetings!, The 'cp' and 'ln' command provides the ability to perform 'bulk' operation, by specifying multiple source files and a target destination. In addition to convenience, this approach provides significant performance benefits, compared with running

Pair-wise file operation (copy, link)

2024-08-25 Thread Yair Lenga
Greetings!, The 'cp' and 'ln' command provides the ability to perform 'bulk' operation, by specifying multiple source files and a target destination. In addition to convenience, this approach provides significant performance benefits, compared with running multiple cp/ln commands, one for each fil