Just run this command and lost all my picturesfind . -maxdepth 1 -type f -name "*.jpg" -exec mv {} $(date +%s).jpg \;
find . -maxdepth 1 -type f -name "*.jpg" -exec mv {} $(date +%s).jpg \;
>>103250150restore from backupoh you don't have one...?AAAAHAHAHAHAHAHAHAHA
>>103250150>dude you don't need a general purpose PL, bash will do
It copied them all to one file overwriting each other?
>>103250150always test how it runs beforehand>>103250287yeah it moved all images that was found withing same second into same place
>>103250287Yes. No warning at all.
photorec
>>103250353I'm using termux, no root.
>using jpg in the year 2024
>>103250150KWAB
>>103250150[sad news]i just told my computer to do something and it did itupon noticing the result i realised i made a mistakei would still like to blame my computer though
>>103250150i used something similar a while ago to replace text inside some files, maybe it can give you some ideas find . -type f -name \*.txt -exec sed -i.bak 's|http://|rtmp://|g' {} +
find . -type f -name \*.txt -exec sed -i.bak 's|http://|rtmp://|g' {} +
>>103250370tough luck
>>103250465I'm not blaming anyone, though?
>>103250319Right yeah I've done that when my code logic fucks up because it doesn't retrieve a filename and just writes to blank plus extension. I list like 2500 json files as they all got renamed to just ".json"
>>103250150just needed a -i behind the mv.
>>103250150you're a bit of a retard, anon
>>103250382jxl>>avif
>>103250150have one jpg, bro. save it, it's all yours.
apparently there are 124,446 jpgs on my computer. so, which one do you want?
>>103251022You don't have the ones I want, I hope.
>>103251095give me some hints. no pizza, though.
>>103251095heres a good one
>>103250150Sorry for your loss. Generally speaking, I wouldn't recommend using mv without the --no-clobber (-n) flag, like ever, unless you actively desire overwriting.
>>103251201coal
>>103250652false. this is shifting the blame to the developers: >>103250321
>>103251383You have a point.
>>103251383it is justifiedone of the biggest linux problems is that it is too easy to delete your user files and even critical system filesthe safetyrailing is too small and too easy to step over
>>103251521that's a problem for youstick to your safety-railed os and don't change linux
>>103251729by that pace, me and other 85% of PC users will have to stick to win/mac for some more years
linux needs undo command
>>103251755This but unironically.
>>103251753good, bye
Just restore from your zfs snapshot.You are using zfs, right?
>>103250150you always test critical operations in a mock environment, hope you learned your lesson :-)
>>103251983i use ReiserFS
>>103252007It was a sign from God to me forget about my past.
>>103251753I want less attention on stuff I used. More attention means more corporate and government involvement. No thanks
>>103250465It doesn't sound like he's blaming anyone but himself. And he's right, he is the only one to blame. He made a dumb mistake and hopefully he'll learn from it.
Here is a picture! You can save it if you'd like!
>>103250851>>103252380Thanks, lads.
>>103250150btw is the \; necessary or just ; ?
>>103252407Aparently yes, \ is used to escape the ;
>>103252380This is very funny, may I save this image?
>>103252502Save it, it's all yours my friend!
>>103252540Thank you, I was just concerned you may have been upset if I were to save it without my asking permission, so I was sure to ask before saving it.
>>103250150I did the same with the subtitles for a series I've been working on. Damn, losing all photos must be fucking tough...
>>103250150and now you know why you never run a destructive script (mv is destructive) without testing and/or backing up first. you won't make this mistake again in the future.>>103252407it's how you terminate the command to -exec in find.
>>103250150always. ALWAYS do a dry run of commands like this. like, instead of running mv, prepend "echo", like this:find . -maxdepth 1 -type f -name "*.jpg" -exec echo mv {} $(date +%s).jpg \;also, my suggestion right now is to shutdown your computer ASAP, grab a livecd/liveusb, install the testdisk package and run photorec to try to recover those files
find . -maxdepth 1 -type f -name "*.jpg" -exec echo mv {} $(date +%s).jpg \;
>>103250150You should've used parallels for this.
>>103252407Yes, ; is interpeted by most shells as a special character with context, you want to pass it down to find.
>>103250150oh no, all those pepes and jaks, how are you going to spam-troll blue boards now?
>>103250150>testing in productionyou get what you fucking deserve
>>103252798>shutdown your computer ASAP, grab a livecd/liveusb, install the testdisk package and run photorec to try to recover those filesthisI once recovered 80% of my film archive like this
>>103251201gem
>>103251095Here's a woomy for you anon, keep her safe and warm and she'll bring you good luck.
>>103251265kys
you have automatic btrfs snapshots, right?
>>103255293>automatic snapshotsanything thats automatic is bloated. except rifles.
>>103250150Windows doesn't have this problem
>>103250150You can use mv -i to make it prompt before taking action.
>>103255942I can assure you that findutils behaves in exactly the same way when ran from Windows.Don't blame the tool, blame the retard using it.
>>103250150Brutal.Buy an external drive and back your shit up regularly.Let this be a lesson, place your amazon order today.>>103251201c' 'n 'g