After running the following code in a directory (actually a sub-directory of my pictures folder, if that helps) consisting of nothing other than about 60 png images:
for i in *;
do mv "${i}" Surv${53+count}.`echo "${i}" | awk -F. '{print $2}'`;
((++count)); done
I found that all but the last of these pngs images had vanished. Is there any way to restore them? At the time I thought that I had them backed up, but I am sad to discover that I have in fact not.
alias mv='mv -i'
for the~/.bash_aliases
. – dessert Apr 30 '18 at 14:21-i
option for every time you rename something withmv
something, so that it asks you for every single file it overwrites. As to your current problem please try the solutions presented in the following question: – dessert Apr 30 '18 at 15:57rm
or “overwrote” it withmv
, in either case the link to the file is destroyed. Recovery tools in general try their best to get these links back, and that's also what you want to do now – as far as I know. – dessert Apr 30 '18 at 17:13