LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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, 08:05 AM   #16
robertkwild
Member
 
Registered: Feb 2015
Posts: 382

Original Poster
Rep: Reputation: Disabled

will something like this work -

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

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

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, 12:45 AM   #19
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,879

Rep: Reputation: 7317Reputation: 7317Reputation: 7317Reputation: 7317Reputation: 7317Reputation: 7317Reputation: 7317Reputation: 7317Reputation: 7317Reputation: 7317Reputation: 7317
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, 04:30 AM   #20
robertkwild
Member
 
Registered: Feb 2015
Posts: 382

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, 06:35 PM   #21
!!!
Member
 
Registered: Jan 2017
Location: Fremont, CA, USA
Distribution: Trying any&ALL on old/minimal
Posts: 997

Rep: Reputation: 382Reputation: 382Reputation: 382Reputation: 382
-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



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
Copying files in dolphin - how to monitor progress and or stop process cilbuper Linux - Software 4 05-26-2018 12:57 AM
LXer: How to monitor progress of Linux commands using PV and Progress utilities LXer Syndicated Linux News 0 11-11-2016 07:01 PM
git checkout: how to monitor progress (node.js) eantoranz Programming 8 11-06-2015 05:18 PM
Clone Win XP and monitor progress -- Knoppix dw85745 Linux - Newbie 5 05-02-2009 07:08 PM
Some progress - but need more help mrh7184 Linux - Wireless Networking 1 10-04-2005 06:58 AM

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

All times are GMT -5. The time now is 04:59 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
Open Source Consulting | Domain Registration