[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-bash] Replace empty files with real ones
From: |
James |
Subject: |
[Help-bash] Replace empty files with real ones |
Date: |
Sat, 11 May 2019 00:44:15 +0200 |
User-agent: |
NeoMutt/20180716 |
Hello,
I'm in a nasty situation and I couldn't figure out how to solve this issue.
A large number of my pictures are gone due to a badly written bash script.
I could recover many of them but some are just empty files (with proper names,
though).
Luckily, some pictures had been saved multiple places, and they had unique file
names.
I was wondering if I could replace the empty files with regular images if they
have the very same file name?
For instance /mnt/recover/dir1/img007.jpg file is empty but
/home/user/Images/dir7/img007.jpg has content.
(there can be many duplicates of img007.jpg elsewhere)
find /mnt/recover -type f -empty found 20.000 files or so.
Thank you
- [Help-bash] Replace empty files with real ones,
James <=