Sign in
Log inSign up

This bash command deleted my files, how do I recover.

Indu Pillai's photo
Indu Pillai
·Feb 28, 2019

I accidentally deleted some important image files using the following bash command, while I was trying to rename those files.

for file in *.jpg
do
  mv "$file" "${file/*.jpg/$$$.jpg}"
done

Are these files moved somewhere, got hidden, or completely deleted? Is there any way to recover these files?

Thank you!