Run Rsync for multiple files in parallel from 2 different directories and find elapsed time for each file and all files The Next CEO of Stack OverflowGNU parallel vs & (I mean background) vs xargs -Prsync list of files in sub-directories to remote server and delete extraneousrsync multiple files to multiple directoriesrsync hangs unless I defrag ext4 filesystemWhat is wrong with my init.d script [Segmentation fault]Copy multiple files from different directories while renaming?rsync multiple files from multiple directories in linuxrsync --update with symlinksStop rsync scheduled task race condition (large directory, small time interval)Why does adding -prune to my sync script cause rsync to do a DRY-RUN?How can I iterate through each line of a file using each line to replace a string in other files, creating a new file each time

Are there languages with no euphemisms?

How to write the block matrix in LaTex?

How should I support this large drywall patch?

If the heap is initialized for security, then why is the stack uninitialized?

Can a single photon have an energy density?

Is a stroke of luck acceptable after a series of unfavorable events?

Why did we only see the N-1 starfighters in one film?

Does it take more energy to get to Venus or to Mars?

Should I tutor a student who I know has cheated on their homework?

Is HostGator storing my password in plaintext?

Term for the "extreme-extension" version of a straw man fallacy?

What's the point of interval inversion?

How to make a variable always equal to the result of some calculations?

Increase performance creating Mandelbrot set in python

How do scammers retract money, while you can’t?

How to use tikz in fbox?

Why do professional authors make "consistency" mistakes? And how to avoid them?

Describing a person. What needs to be mentioned?

Why here is plural "We went to the movies last night."

What is the point of a new vote on May's deal when the indicative votes suggest she will not win?

What does this shorthand mean?

Opposite of a diet

Can a caster that cast Polymorph on themselves stop concentrating at any point even if their Int is low?

Anatomically Correct Mesopelagic Aves



Run Rsync for multiple files in parallel from 2 different directories and find elapsed time for each file and all files



The Next CEO of Stack OverflowGNU parallel vs & (I mean background) vs xargs -Prsync list of files in sub-directories to remote server and delete extraneousrsync multiple files to multiple directoriesrsync hangs unless I defrag ext4 filesystemWhat is wrong with my init.d script [Segmentation fault]Copy multiple files from different directories while renaming?rsync multiple files from multiple directories in linuxrsync --update with symlinksStop rsync scheduled task race condition (large directory, small time interval)Why does adding -prune to my sync script cause rsync to do a DRY-RUN?How can I iterate through each line of a file using each line to replace a string in other files, creating a new file each time










1















I have lots of dump files in 2 different directories that need to be uploaded using rsync, I want to run rsync for each dump file simultaneously to save time.



Dump Files:



Dir1:

- /u05/expdpdump/exppdb/dir1/NoTDE_CDB_FULL1_01.dmp
- /u05/expdpdump/exppdb/dir1/NoTDE_CDB_FULL1_02.dmp
- /u05/expdpdump/exppdb/dir1/NoTDE_CDB_FULL1_03.dmp
- /u05/expdpdump/exppdb/dir1/NoTDE_CDB_FULL1_04.dmp

Dir2:

- /u05/expdpdump/exppdb/dir2/NoTDE_CDB_FULL2_01.dmp
- /u05/expdpdump/exppdb/dir2/NoTDE_CDB_FULL2_02.dmp
- /u05/expdpdump/exppdb/dir2/NoTDE_CDB_FULL2_03.dmp
- /u05/expdpdump/exppdb/dir2/NoTDE_CDB_FULL2_04.dmp


Following rsync Command to run for each dumpfile from each directory in the background:



rclone sync /u05/expdpdump/exppdb/NoTDE_CDB_FULL_01.dmp NoTDE_Mig1:IC_dbbackup_config_datapump_xxxxxx


I managed to get the desired output to run rsync for each file, however, i want to track the start and end time for each file as well as overall elapsed time for the rsync jobs running in background.
using time in for loop will provide only elapsed time for each file, however i also need overall elapsed time of Start and End Time after completing all jobs




dumpdir1="/u05/expdpdump/exppdb/dir1"

for i in $dumpdir1/*.dmp
do

echo " time rclone sync $i NoTDE_Mig1:IC_dbbackup_config_datapump_v00rcfh_iad3p2 &"
done

dumpdir2="/u05/expdpdump/exppdb/dir2"

for i in $dumpdir2/*.dmp
do
echo " time rclone sync $i NoTDE_Mig1:IC_dbbackup_config_datapump_v00rcfh_iad3p2 &"
done```











share|improve this question



















  • 3





    Possible duplicate of GNU parallel vs & (I mean background) vs xargs -P

    – user1133275
    yesterday















1















I have lots of dump files in 2 different directories that need to be uploaded using rsync, I want to run rsync for each dump file simultaneously to save time.



Dump Files:



Dir1:

- /u05/expdpdump/exppdb/dir1/NoTDE_CDB_FULL1_01.dmp
- /u05/expdpdump/exppdb/dir1/NoTDE_CDB_FULL1_02.dmp
- /u05/expdpdump/exppdb/dir1/NoTDE_CDB_FULL1_03.dmp
- /u05/expdpdump/exppdb/dir1/NoTDE_CDB_FULL1_04.dmp

Dir2:

- /u05/expdpdump/exppdb/dir2/NoTDE_CDB_FULL2_01.dmp
- /u05/expdpdump/exppdb/dir2/NoTDE_CDB_FULL2_02.dmp
- /u05/expdpdump/exppdb/dir2/NoTDE_CDB_FULL2_03.dmp
- /u05/expdpdump/exppdb/dir2/NoTDE_CDB_FULL2_04.dmp


Following rsync Command to run for each dumpfile from each directory in the background:



rclone sync /u05/expdpdump/exppdb/NoTDE_CDB_FULL_01.dmp NoTDE_Mig1:IC_dbbackup_config_datapump_xxxxxx


I managed to get the desired output to run rsync for each file, however, i want to track the start and end time for each file as well as overall elapsed time for the rsync jobs running in background.
using time in for loop will provide only elapsed time for each file, however i also need overall elapsed time of Start and End Time after completing all jobs




dumpdir1="/u05/expdpdump/exppdb/dir1"

for i in $dumpdir1/*.dmp
do

echo " time rclone sync $i NoTDE_Mig1:IC_dbbackup_config_datapump_v00rcfh_iad3p2 &"
done

dumpdir2="/u05/expdpdump/exppdb/dir2"

for i in $dumpdir2/*.dmp
do
echo " time rclone sync $i NoTDE_Mig1:IC_dbbackup_config_datapump_v00rcfh_iad3p2 &"
done```











share|improve this question



















  • 3





    Possible duplicate of GNU parallel vs & (I mean background) vs xargs -P

    – user1133275
    yesterday













1












1








1








I have lots of dump files in 2 different directories that need to be uploaded using rsync, I want to run rsync for each dump file simultaneously to save time.



Dump Files:



Dir1:

- /u05/expdpdump/exppdb/dir1/NoTDE_CDB_FULL1_01.dmp
- /u05/expdpdump/exppdb/dir1/NoTDE_CDB_FULL1_02.dmp
- /u05/expdpdump/exppdb/dir1/NoTDE_CDB_FULL1_03.dmp
- /u05/expdpdump/exppdb/dir1/NoTDE_CDB_FULL1_04.dmp

Dir2:

- /u05/expdpdump/exppdb/dir2/NoTDE_CDB_FULL2_01.dmp
- /u05/expdpdump/exppdb/dir2/NoTDE_CDB_FULL2_02.dmp
- /u05/expdpdump/exppdb/dir2/NoTDE_CDB_FULL2_03.dmp
- /u05/expdpdump/exppdb/dir2/NoTDE_CDB_FULL2_04.dmp


Following rsync Command to run for each dumpfile from each directory in the background:



rclone sync /u05/expdpdump/exppdb/NoTDE_CDB_FULL_01.dmp NoTDE_Mig1:IC_dbbackup_config_datapump_xxxxxx


I managed to get the desired output to run rsync for each file, however, i want to track the start and end time for each file as well as overall elapsed time for the rsync jobs running in background.
using time in for loop will provide only elapsed time for each file, however i also need overall elapsed time of Start and End Time after completing all jobs




dumpdir1="/u05/expdpdump/exppdb/dir1"

for i in $dumpdir1/*.dmp
do

echo " time rclone sync $i NoTDE_Mig1:IC_dbbackup_config_datapump_v00rcfh_iad3p2 &"
done

dumpdir2="/u05/expdpdump/exppdb/dir2"

for i in $dumpdir2/*.dmp
do
echo " time rclone sync $i NoTDE_Mig1:IC_dbbackup_config_datapump_v00rcfh_iad3p2 &"
done```











share|improve this question
















I have lots of dump files in 2 different directories that need to be uploaded using rsync, I want to run rsync for each dump file simultaneously to save time.



Dump Files:



Dir1:

- /u05/expdpdump/exppdb/dir1/NoTDE_CDB_FULL1_01.dmp
- /u05/expdpdump/exppdb/dir1/NoTDE_CDB_FULL1_02.dmp
- /u05/expdpdump/exppdb/dir1/NoTDE_CDB_FULL1_03.dmp
- /u05/expdpdump/exppdb/dir1/NoTDE_CDB_FULL1_04.dmp

Dir2:

- /u05/expdpdump/exppdb/dir2/NoTDE_CDB_FULL2_01.dmp
- /u05/expdpdump/exppdb/dir2/NoTDE_CDB_FULL2_02.dmp
- /u05/expdpdump/exppdb/dir2/NoTDE_CDB_FULL2_03.dmp
- /u05/expdpdump/exppdb/dir2/NoTDE_CDB_FULL2_04.dmp


Following rsync Command to run for each dumpfile from each directory in the background:



rclone sync /u05/expdpdump/exppdb/NoTDE_CDB_FULL_01.dmp NoTDE_Mig1:IC_dbbackup_config_datapump_xxxxxx


I managed to get the desired output to run rsync for each file, however, i want to track the start and end time for each file as well as overall elapsed time for the rsync jobs running in background.
using time in for loop will provide only elapsed time for each file, however i also need overall elapsed time of Start and End Time after completing all jobs




dumpdir1="/u05/expdpdump/exppdb/dir1"

for i in $dumpdir1/*.dmp
do

echo " time rclone sync $i NoTDE_Mig1:IC_dbbackup_config_datapump_v00rcfh_iad3p2 &"
done

dumpdir2="/u05/expdpdump/exppdb/dir2"

for i in $dumpdir2/*.dmp
do
echo " time rclone sync $i NoTDE_Mig1:IC_dbbackup_config_datapump_v00rcfh_iad3p2 &"
done```








shell-script rsync for






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited yesterday







CoolChap007

















asked 2 days ago









CoolChap007CoolChap007

63




63







  • 3





    Possible duplicate of GNU parallel vs & (I mean background) vs xargs -P

    – user1133275
    yesterday












  • 3





    Possible duplicate of GNU parallel vs & (I mean background) vs xargs -P

    – user1133275
    yesterday







3




3





Possible duplicate of GNU parallel vs & (I mean background) vs xargs -P

– user1133275
yesterday





Possible duplicate of GNU parallel vs & (I mean background) vs xargs -P

– user1133275
yesterday










1 Answer
1






active

oldest

votes


















0














Something like this:



# `time` will give the total time
time parallel -j0 --joblog mylog rclone sync NoTDE_Mig1:IC_dbbackup_config_datapump_v00rcfh_iad3p2 ::: /u05/expdpdump/exppdb/dir1,2/*.dmp
# the log contains the time per file
cat mylog


Depending on your disks you can get better performance if you do not run all commands in parallel. You limit the number of jobs running in parallel to 5 by replacing -j0 with -j5.






share|improve this answer























  • Thanks Ole, does your suggestion provides "elapsed time" for each file as well as overall elapsed time for all rclone jobs? I see 'prefixing time' in for loop will provide me elapsed time for each file, however, i am afraid, whether i can track start time and end time of overall.

    – CoolChap007
    yesterday











  • I get following error -bash: parallel: command not found

    – CoolChap007
    yesterday






  • 1





    @CoolChap007 so install it then!

    – roaima
    yesterday











Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f508862%2frun-rsync-for-multiple-files-in-parallel-from-2-different-directories-and-find-e%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














Something like this:



# `time` will give the total time
time parallel -j0 --joblog mylog rclone sync NoTDE_Mig1:IC_dbbackup_config_datapump_v00rcfh_iad3p2 ::: /u05/expdpdump/exppdb/dir1,2/*.dmp
# the log contains the time per file
cat mylog


Depending on your disks you can get better performance if you do not run all commands in parallel. You limit the number of jobs running in parallel to 5 by replacing -j0 with -j5.






share|improve this answer























  • Thanks Ole, does your suggestion provides "elapsed time" for each file as well as overall elapsed time for all rclone jobs? I see 'prefixing time' in for loop will provide me elapsed time for each file, however, i am afraid, whether i can track start time and end time of overall.

    – CoolChap007
    yesterday











  • I get following error -bash: parallel: command not found

    – CoolChap007
    yesterday






  • 1





    @CoolChap007 so install it then!

    – roaima
    yesterday















0














Something like this:



# `time` will give the total time
time parallel -j0 --joblog mylog rclone sync NoTDE_Mig1:IC_dbbackup_config_datapump_v00rcfh_iad3p2 ::: /u05/expdpdump/exppdb/dir1,2/*.dmp
# the log contains the time per file
cat mylog


Depending on your disks you can get better performance if you do not run all commands in parallel. You limit the number of jobs running in parallel to 5 by replacing -j0 with -j5.






share|improve this answer























  • Thanks Ole, does your suggestion provides "elapsed time" for each file as well as overall elapsed time for all rclone jobs? I see 'prefixing time' in for loop will provide me elapsed time for each file, however, i am afraid, whether i can track start time and end time of overall.

    – CoolChap007
    yesterday











  • I get following error -bash: parallel: command not found

    – CoolChap007
    yesterday






  • 1





    @CoolChap007 so install it then!

    – roaima
    yesterday













0












0








0







Something like this:



# `time` will give the total time
time parallel -j0 --joblog mylog rclone sync NoTDE_Mig1:IC_dbbackup_config_datapump_v00rcfh_iad3p2 ::: /u05/expdpdump/exppdb/dir1,2/*.dmp
# the log contains the time per file
cat mylog


Depending on your disks you can get better performance if you do not run all commands in parallel. You limit the number of jobs running in parallel to 5 by replacing -j0 with -j5.






share|improve this answer













Something like this:



# `time` will give the total time
time parallel -j0 --joblog mylog rclone sync NoTDE_Mig1:IC_dbbackup_config_datapump_v00rcfh_iad3p2 ::: /u05/expdpdump/exppdb/dir1,2/*.dmp
# the log contains the time per file
cat mylog


Depending on your disks you can get better performance if you do not run all commands in parallel. You limit the number of jobs running in parallel to 5 by replacing -j0 with -j5.







share|improve this answer












share|improve this answer



share|improve this answer










answered yesterday









Ole TangeOle Tange

12.9k1457107




12.9k1457107












  • Thanks Ole, does your suggestion provides "elapsed time" for each file as well as overall elapsed time for all rclone jobs? I see 'prefixing time' in for loop will provide me elapsed time for each file, however, i am afraid, whether i can track start time and end time of overall.

    – CoolChap007
    yesterday











  • I get following error -bash: parallel: command not found

    – CoolChap007
    yesterday






  • 1





    @CoolChap007 so install it then!

    – roaima
    yesterday

















  • Thanks Ole, does your suggestion provides "elapsed time" for each file as well as overall elapsed time for all rclone jobs? I see 'prefixing time' in for loop will provide me elapsed time for each file, however, i am afraid, whether i can track start time and end time of overall.

    – CoolChap007
    yesterday











  • I get following error -bash: parallel: command not found

    – CoolChap007
    yesterday






  • 1





    @CoolChap007 so install it then!

    – roaima
    yesterday
















Thanks Ole, does your suggestion provides "elapsed time" for each file as well as overall elapsed time for all rclone jobs? I see 'prefixing time' in for loop will provide me elapsed time for each file, however, i am afraid, whether i can track start time and end time of overall.

– CoolChap007
yesterday





Thanks Ole, does your suggestion provides "elapsed time" for each file as well as overall elapsed time for all rclone jobs? I see 'prefixing time' in for loop will provide me elapsed time for each file, however, i am afraid, whether i can track start time and end time of overall.

– CoolChap007
yesterday













I get following error -bash: parallel: command not found

– CoolChap007
yesterday





I get following error -bash: parallel: command not found

– CoolChap007
yesterday




1




1





@CoolChap007 so install it then!

– roaima
yesterday





@CoolChap007 so install it then!

– roaima
yesterday

















draft saved

draft discarded
















































Thanks for contributing an answer to Unix & Linux Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f508862%2frun-rsync-for-multiple-files-in-parallel-from-2-different-directories-and-find-e%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

getting Checkpoint VPN SSL Network Extender working in the command lineHow to connect to CheckPoint VPN on Ubuntu 18.04LTS?Will the Linux ( red-hat ) Open VPNC Client connect to checkpoint or nortel VPN gateways?VPN client for linux machine + support checkpoint gatewayVPN SSL Network Extender in FirefoxLinux Checkpoint SNX tool configuration issuesCheck Point - Connect under Linux - snx + OTPSNX VPN Ububuntu 18.XXUsing Checkpoint VPN SSL Network Extender CLI with certificateVPN with network manager (nm-applet) is not workingWill the Linux ( red-hat ) Open VPNC Client connect to checkpoint or nortel VPN gateways?VPN client for linux machine + support checkpoint gatewayImport VPN config files to NetworkManager from command lineTrouble connecting to VPN using network-manager, while command line worksStart a VPN connection with PPTP protocol on command linestarting a docker service daemon breaks the vpn networkCan't connect to vpn with Network-managerVPN SSL Network Extender in FirefoxUsing Checkpoint VPN SSL Network Extender CLI with certificate

Cannot Extend partition with GParted The 2019 Stack Overflow Developer Survey Results Are In Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) 2019 Community Moderator Election ResultsCan't increase partition size with GParted?GParted doesn't recognize the unallocated space after my current partitionWhat is the best way to add unallocated space located before to Ubuntu 12.04 partition with GParted live?I can't figure out how to extend my Arch home partition into free spaceGparted Linux Mint 18.1 issueTrying to extend but swap partition is showing as Unknown in Gparted, shows proper from fdiskRearrange partitions in gparted to extend a partitionUnable to extend partition even though unallocated space is next to it using GPartedAllocate free space to root partitiongparted: how to merge unallocated space with a partition

Marilyn Monroe Ny fiainany manokana | Jereo koa | Meny fitetezanafanitarana azy.