Page 1 of 1

get current status e.g. Copying, please wait... 1234 ok, 0 failed

Posted: 06 Oct 2020, 10:37
by rosch
Hi all,

I was wondering if there is a way to get the current status of the file recovery.
I'm using Advanced / Filesystem Utils to list and copy files from the dying HD.

Is the log file testdisk.log an option to compute the status?

By current status I mean the text

Code: Select all

Copying, please wait... 1234 ok, 0 failed
The idea is to read this status regularly using some terminal command, and set up a cron job to get updates on the recovery on a regular basis..

Many thanks in advance.

Re: get current status e.g. Copying, please wait... 1234 ok, 0 failed

Posted: 06 Oct 2020, 10:59
by recuperation
I don't know.

Please run Testdisk and select any healthy volume and try copying a directory tree from there to another location.
Check the log file for any lines relating to the copy process.

Please report your findings here.

Thanks.

Re: get current status e.g. Copying, please wait... 1234 ok, 0 failed

Posted: 06 Oct 2020, 21:22
by rosch
It looks like this is not trivial / not doable using testdisk or its log file.

You can use the usual file commands like the following to give you the number of files:

Code: Select all

find /path/to/recovery -type f | wc -l
find: lists the files, -type f is to limit the search to only files (no folders), one file name per line
| wc -l: the output of the find command is fed to wc -l which prints the newline counts

Re: get current status e.g. Copying, please wait... 1234 ok, 0 failed

Posted: 06 Oct 2020, 21:53
by recuperation
Thank you. As I am a casual linux command line user I will have to read documentation to understand what it does. :)

Re: get current status e.g. Copying, please wait... 1234 ok, 0 failed

Posted: 06 Oct 2020, 22:38
by rosch
recuperation wrote: 06 Oct 2020, 21:53 Thank you. As I am a casual linux command line user I will have to read documentation to understand what it does. :)
Edited my post, added some explaining about the used commands.