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!

Hassle-free blogging platform that developers and teams love.
  • Docs by Hashnode
    New
  • Blogs
  • AI Markdown Editor
  • GraphQL APIs
  • Open source Starter-kit

© Hashnode 2024 — LinearBytes Inc.

Privacy PolicyTermsCode of Conduct