Sponsored Content
Top Forums Programming Program or bash script to see total progress of copy Post 303003553 by robertkwild on Friday 15th of September 2017 05:05:43 PM
Old 09-15-2017
smashed it -

Code:
[root@robw-linux data]# tar -c call_the_midwife_7_1708/ | pv -lep -s 32455212 | tar -x -C /mnt/local/data/new/
[=> ] 2% ETA 2:34:31

and to find the dir size i did -

Code:
du -s call_the_midwife_7_1708/

but doing it via this method takes ages as its creating the tar and extracting the tar, normally doing a normal copy only takes roughly 18 minutes

Moderator's Comments:
Mod Comment Please use CODE tags as required by forum rules!

Last edited by RudiC; 09-16-2017 at 03:57 AM.. Reason: Added CODE tags.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Making a progress gauge in a bash script

Hello once again: One thing that seems to be a nice feature is a progress gauge... so I can see how long an operation will take for a task to complete if it is requiring a lot of processing or the file is enormous. I have seen references to gauge operations, but I don't know anything about it or... (1 Reply)
Discussion started by: ccox85
1 Replies

2. Homework & Coursework Questions

Run Program from Bash CGI-Script

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: This is a problem I am having with my 2 semester senior project. I have a LAMP server running Ubuntu 9.10 with... (8 Replies)
Discussion started by: JMooney5115
8 Replies

3. Shell Programming and Scripting

bash script to copy files

hey everyone, new here i have arch setup and i am using smbnetfs to mount some windows shares in /mnt/smbnet what i want to do is copy files from my home dir to a dir in /mnt/smbnet but i also need it to remove files if i have deleted them from my home dir seems that cp would be the... (8 Replies)
Discussion started by: dodgefan67
8 Replies

4. Shell Programming and Scripting

Problem with bash shell script program

Hi, This is my program. #!/bin/bash today=`date +"%b-%d-%Y"` SERVICE="pbxconnect.php" if ; then echo "pbx program is running" else nohup php pbxconnect.php > logpbx-$today.txt & fi On executing using "sh myprogram.sh" , i get the following error. myprogram.sh: line 4: ' My... (7 Replies)
Discussion started by: gskumar1234
7 Replies

5. Shell Programming and Scripting

bash script to check if a program is running

I'm a bit new to bash programming and I was assigned the job of writing a script that will check to see if a program server is running and to restart the program if it is not up. The script is supposed to check the program every hour (which I have looked up and I believe I know how to do) and send... (3 Replies)
Discussion started by: mcknz
3 Replies

6. UNIX for Dummies Questions & Answers

Bash script to execute a program to rename files

I just can't figure it out , so please just give me a pice of advise how to: The existing Linux program foo2bar takes as its only argument the name of a single foo file and converts it to an appropriately-named bar file. Provide a script that when executed will run foo2bar against all foo... (4 Replies)
Discussion started by: raymen
4 Replies

7. Shell Programming and Scripting

Bash script to start program and answer prompts?

I'm trying to write a script the simplifies the execution of a program: After starting the program (sh ~/.mfix/model/make_mfix) I am prompted four times for options: Do you need SMP version? (y/n) Do you need DMP version? (y/n) Do you need debug version? (y/n) Force re-compilation of... (2 Replies)
Discussion started by: lanew
2 Replies

8. Programming

Putting bash script in C program

suppose i have a bash script: #!/bin/bash echo "hello" echo "how are you" echo "today" how can i put the entire script above into a basic c program? i do not want to translate the bash code to a c code. i want C to run the bash code. is this possible? i found this on the... (15 Replies)
Discussion started by: SkySmart
15 Replies

9. UNIX for Dummies Questions & Answers

Running a C/C++ program and/or bash script from a server

I wish to be able to give to a client the opportunity to : 0) Turn one of my ubuntu computers into a webserver 1) See a webpage after visiting a url where an external user/client can set a couple of variables (e.g. Number1= ?, Number2=?) 2) By pressing "run" the program runs on my machine 3)... (1 Reply)
Discussion started by: frad
1 Replies

10. UNIX for Beginners Questions & Answers

Bash script to get total size off of remainder calculated

I am working on a script to get the final total size and so far have the following and wondering if this can be improved. # Compare the desired size of each lvm to the standard size. If it is desired is larger than calculate the difference and keep that value as the amount to add to that LVM. ... (5 Replies)
Discussion started by: user3528
5 Replies
PROGRESS(1)						    BSD General Commands Manual 					       PROGRESS(1)

NAME
progress -- feed input to a command, displaying a progress bar SYNOPSIS
progress [-ez] [-b buffersize] [-f file] [-l length] [-p prefix] cmd [args ...] DESCRIPTION
The progress utility opens a pipe to cmd and feeds an input stream into it, while displaying a progress bar to standard output. If no file- name is specified, progress reads from standard input. Where feasible, progress fstat(2)s the input to determine the length, so a time esti- mate can be calculated. If no length is specified or determined, progress simply displays a count of the data and the data rate. The options are as follows: -b buffersize Read in buffers of the specified size (default 64k). An optional suffix (per strsuftoll(3)) may be given. -e Display progress to standard error instead of standard output. -f file Read from the specified file instead of standard input. -l length Use the specified length for the time estimate, rather than attempting to fstat(2) the input. An optional suffix (per strsuftoll(3)) may be given. -p prefix Print the given ``prefix'' text before (left of) the progress bar. -z Filter the input through gunzip(1). If -f is specified, calculate the length using gzip -l. EXIT STATUS
progress exits 0 on success. EXAMPLES
The command progress -zf file.tar.gz tar xf - will extract the file.tar.gz displaying the progress bar as time passes: 0% | | 0 0.00 KiB/s --:-- ETA 40% |******** | 273 KiB 271.95 KiB/s 00:01 ETA 81% |*********************** | 553 KiB 274.61 KiB/s 00:00 ETA 100% |*******************************| 680 KiB 264.59 KiB/s 00:00 ETA If it is preferred to monitor the progress of the decompression process (unlikely), then progress -f file.tar.gz tar zxf - could be used. The command dd if=/dev/rwd0d ibs=64k | progress -l 120g dd of=/dev/rwd1d obs=64k will copy the 120 GiB disk wd0 (/dev/rwd0d) to wd1 (/dev/rwd1d), displaying a progress bar during the operation. SEE ALSO
ftp(1), strsuftoll(3) HISTORY
progress first appeared in NetBSD 1.6.1. The dynamic progress bar display code is part of ftp(1). AUTHORS
progress was written by John Hawkinson <jhawk@NetBSD.org>. ftp(1)'s dynamic progress bar was written by Luke Mewburn. BUGS
Since the progress bar is displayed asynchronously, it may be difficult to read some error messages, both those produced by the pipeline, as well as those produced by progress itself. BSD
June 6, 2007 BSD
All times are GMT -4. The time now is 02:06 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy