Sponsored Content
Top Forums Programming Script to monitor progress of find/exec command Post 303004232 by rbatte1 on Thursday 28th of September 2017 07:19:48 AM
Old 09-28-2017
You could try changing it to drive a loop, something like this:-
Code:
while read file
do
   printf "$file\n" >&2
   md5sum "$file"
done < <(find . -type f) >> /md5sums/file.txt

That should write to STDERR and not get captured in the output file. Can I just ask, do you mean to append to your output file? The output could be a complete overwrite because it should be the output from the find command, not each individual md5sum.



I hope that this helps,
Robin

Last edited by rbatte1; 09-28-2017 at 08:55 AM.. Reason: Replaced suggestion because an extra -exec clause didn't work.
 

9 More Discussions You Might Find Interesting

1. Programming

Monitor a progress bar using separate threads

I need to look at sample codes or programs that monitor a task using separate threads in Unix and C. (0 Replies)
Discussion started by: ryphelon
0 Replies

2. UNIX for Dummies Questions & Answers

find command exec error

Hi All, i am writing a shell script in korn shell which deletes all the files in a directory once in every 10DAYS. the directory has different format files. the script has something like this; cd /home/data/pavi echo "Please Enter the Number of Days to search for" read DAYS... (2 Replies)
Discussion started by: pavan_test
2 Replies

3. UNIX for Advanced & Expert Users

Find command with prune and exec

Hi, I'm using the following command to get a list of files on the system. find /releases -type f -exec ls -l > /home/sebarry/list.txt '{}' \; however, its searching a directory I don't want it to search so I know I have to use prune but I don't seem to be able to get prune and exec to work... (1 Reply)
Discussion started by: Sebarry
1 Replies

4. Shell Programming and Scripting

find command with -exec

Hi People, I have a directory full of compressed files (.Z extention) In many of these files there is a string pattern (3800078163033) I want to find all file names which contain this string in their text. Regards, Abhishek (2 Replies)
Discussion started by: max29583
2 Replies

5. Shell Programming and Scripting

find command with -exec

Hi all, Please could someone help with the following command requirement. I basically need to find files NEWER than a given file and order the result on time. My attempt so far is as follows: find . -newer <file_name> -exec ls -lrt {} ;\ But I dont seem to get the right result... (12 Replies)
Discussion started by: jonnyd
12 Replies

6. UNIX for Dummies Questions & Answers

What does the '\' in find -exec command

Hi, I have two scripts that remove files. One works fine and is coded find -name "syst*" -mtime +1 -exec rm {} \; The other is almost the same - only thing missing is the '\'. On that script though I keep getting: rm syst1202.file ? etc Does the \ make that difference or is it a... (3 Replies)
Discussion started by: Grueben
3 Replies

7. Shell Programming and Scripting

Find and move command with exec

Hi all, I am trying to find files newer than a given file and them mv them to a new location. So I far I have: find . ! -newer <file_name> -exec ls -l {} \; and find . ! -newer <file_name> -exec mv /TEMP_LOCATION {} \; find is not liking this. Anyone know how to modify the last... (2 Replies)
Discussion started by: jonnyd
2 Replies

8. Programming

Bash script - find command with delete and exec

hi all, i have devised a script that starts in /restored/ and in there, there are a lot of sub folders called peoples names and in the sub folders are files/folders and it deletes the data in the sub folders BUT not the sub folder itself and it should then touch a file in all the sub folders... (3 Replies)
Discussion started by: robertkwild
3 Replies

9. Shell Programming and Scripting

Linux find command seems to not transmit all the result to the '-exec command'

Hello. From a script, a command for a test is use : find /home/user_install -maxdepth 1 -type f -newer /tmp/000_skel_file_deb ! -newer /tmp/000_skel_file_end -name '.bashrc' -o -name '.profile' -o -name '.gtkrc-2.0' -o -name '.i18n' -o -name '.inputrc' Tha command... (3 Replies)
Discussion started by: jcdole
3 Replies
bt-monitor(1)							    bluez-tools 						     bt-monitor(1)

NAME
bt-monitor - a bluetooth monitor SYNOPSIS
bt-monitor [OPTION...] Help Options: -h, --help Application Options: -a, --adapter=<name|mac> DESCRIPTION
This utility is used to capture DBus signals of bluetoothd. Captured next signals: Manager signals: AdapterAdded AdapterRemoved DefaultAdapterChanged Adapter signals: DeviceCreated DeviceDisappeared DeviceFound DeviceRemoved AdapterPropertyChanged Device signals: DisconnectRequested DevicePropertyChanged Services signals: AudioServiceConnected InputServiceConnected NetworkServiceConnected OPTIONS
-h, --help Show help -a, --adapter <name|mac> Specify adapter to capture by his Name or MAC address (if this option does not defined - all adapters captured) AUTHOR
Alexander Orlenko <zxteam@gmail.com>. SEE ALSO
bt-adapter(1) bt-agent(1) bt-audio(1) bt-device(1) bt-input(1) bt-network(1) bt-serial(1) 2010-08-16 bt-monitor(1)
All times are GMT -4. The time now is 12:41 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy