LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS
User Name
Password
CentOS This forum is for the discussion of CentOS Linux. Note: This forum does not have any official participation.

Notices


Reply
  Search this Thread
Old 09-25-2017, 09:05 AM   #16
robertkwild
Member
 
Registered: Feb 2015
Posts: 342

Original Poster
Rep: Reputation: Disabled

will something like this work -

find . -type f -exec md5sum {} \; | pv | >> /md5sum/source.txt
 
Old 09-25-2017, 09:11 AM   #17
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 10,083

Rep: Reputation: 2983Reputation: 2983Reputation: 2983Reputation: 2983Reputation: 2983Reputation: 2983Reputation: 2983Reputation: 2983Reputation: 2983Reputation: 2983Reputation: 2983
That is syntactically incorrect.
Did you try that at all?
 
Old 09-25-2017, 11:40 AM   #18
robertkwild
Member
 
Registered: Feb 2015
Posts: 342

Original Poster
Rep: Reputation: Disabled
yeah and it worked but it didnt show the ETA and progress

so im guessing as you said the syntax is wrong as if it was right it would show me the ETA and progress ie percent done
 
Old 09-26-2017, 01:45 AM   #19
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 10,083

Rep: Reputation: 2983Reputation: 2983Reputation: 2983Reputation: 2983Reputation: 2983Reputation: 2983Reputation: 2983Reputation: 2983Reputation: 2983Reputation: 2983Reputation: 2983
What I tried to explain in post #15: there is no ETA when you work with find. You cannot estimate anything, because find has no any idea about what will be found at all, it cannot guess. If you want to estimate you need to measure first, but that will definitely slow down the execution.
If you would like to use pv you need to use -s <SIZE> to be able to show real progress, but I have no idea if that size is known at all (or just at the end of the find)
 
Old 09-27-2017, 05:30 AM   #20
robertkwild
Member
 
Registered: Feb 2015
Posts: 342

Original Poster
Rep: Reputation: Disabled
sorry for the late reply just been busy at work

thanks pan, how would i use the find and pv command together

i know the size of the directory im running the find command in by doing a "du -s /source_dir/"
 
Old 10-04-2017, 07:35 PM   #21
!!!
Member
 
Registered: Jan 2017
Posts: 666

Rep: Reputation: 288Reputation: 288Reputation: 288
-exec (subshell with echo > not stdout but /dev/tty)?

Quote:
Originally Posted by pan64 View Post
something like this:
Code:
find . -type f -exec <shell_script> {} \; 

# shell script:

#!/bin/bash
echo -n .
md5sum $1 >> /md5sum/source.txt
(if you want to say thanks just click on yes)
@pan64/anyone: will this work? (maybe to avoid making a script)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: How to monitor progress of Linux commands using PV and Progress utilities LXer Syndicated Linux News 0 11-11-2016 08:01 PM
git checkout: how to monitor progress (node.js) eantoranz Programming 8 11-06-2015 06:18 PM
Copying files in dolphin - how to monitor progress and or stop process cilbuper Linux - Software 1 12-10-2014 11:24 AM
Clone Win XP and monitor progress -- Knoppix dw85745 Linux - Newbie 5 05-02-2009 08:08 PM
Some progress - but need more help mrh7184 Linux - Wireless Networking 1 10-04-2005 07:58 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS

All times are GMT -5. The time now is 09:22 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration