Sample Header Ad - 728x90

How can I recover moved jpg files

0 votes
1 answer
157 views
On my ubuntu system I ran a command and moved all my jpg files to a single file by mistake
src_dir=$1
echo "src_dir: $src_dir"

for f in $src_dir/*; do
    if [ -f $f ]; then
        new_dir=$(date -r $f +"%b_%Y")
        if [ ! -d $new_dir ]; then
            mkdir $new_dir
        fi
        echo "File: $f "
        mv $f $src_dir/$new_dir
    fi
done
I tried recovering my jpg files using recoverJpeg and scalpel. These tools were able to recover the images which I deleted long back. However I did not recover any image which got moved using mv command. I understand its a long shot but is there any way to get back the images?
Asked by Daemon (103 rep)
Feb 7, 2024, 11:09 PM
Last activity: Feb 8, 2024, 12:01 AM