I'm on macOS Mojave 10.14.4, on a APFS SSD. Last week some students delivered me some image files over an image processing assignment. I have an automated routine on Matlab to grade the assignments, but it only loads files with a specific ".jpeg" extension.
Rather than rewrite my routine, I usually just rename the files (a mess of ".jpg", ".JPEG", ".JPG") on terminal. I'm used to do that on my University issued linux desktop. But that day I had my MacBook Pro with me, so I got them with it.
Alas, my terminal command "mv *.jpg *.jpeg" returned with a no such file or directory error, so I left this task for later. Earlier today I got to work after a three day weekend and when I opened the folder, I realized that about half of the files were missing.
My guess is that the mv didn't "fail properly" and, based on some thing that I've already looked around, may have lost the data for good! My Time Machine is at home, so it never got to back up those files.
I have already looked for possibly hidden folders where the files might have ended up, but no luck. Does anyone has any idea where the files may have gone? Or if they are truly lost?
Att.
Osmar
mv *.jpg *.jpeg
does not rename all files ending in .jpg to .jpeg (DOS and Windows do have the rename command that does that) mv will move all its inputs except the last one to the last one. See Unix Haters handbook page 189. Yes you have lost data.mv *.jpg *.jpeg
tomv a.jpg b.jpg
mv *.jpg *.jpeg
will throw an error if there are more then two names after wildcard expansion (and the second name can even be a literal*.jpeg
). So to loose files you would need to have exactly one file matching the*.jpg
part and one (or none) matching the*.jpeg
pattern, and then run the command again after the nextwhatever.jpg
got moved into the directory.find . -name "*.jpeg"
and report the output to us? This should find the files if they're somewhere in the proximity to where you ran this command.