July 5, 20233 yr being new to linux language and while trying to remove only a folder in appdata , after writing first few words "rm r- / mnt/, i accidentally deleted enter.. so i rebooted , but can see only main folders appdata, iso, domain and system, after the reboot, all my other folders including download are deleted , is there a way to recover, kindly help, as have some important pictures, in a created folder, thanks. tower-diagnostics-20230705-1422.zip
July 5, 20233 yr Community Expert If you can't find by browsing disk1 you'll either have to restore from a backup or try your luck with recovery software like UFS Explorer.
July 6, 20233 yr This won't help you now, but having been a Linux admin for many years - If you ever think the command you are typing might be destructive or could be if you accidentally hit Enter at the wrong time: Type echo before that command, like this: $ echo rm -rf /mnt/blah/blah Then if you make a mistake, it'll just return your command on the command line, and won't do anything. When you are happy that you haven't made a terrible error, you can always press up arrow, then Control-a and remove the echo part. I find it particularly useful when doing batch jobs where a mistake might really ruin your day. A fake and not great example is: $ for i in $(ls myfolder); do rm -rf $i; done If you put an echo in there, it'll just display what it's going to do before you actually do it which can be a lifesaver: $ for i in $(ls myfolder); do echo rm -rf $i; done Just a tip because humans make mistakes all too often and just adding echo can really help prevent serious oopsies. Edited July 6, 20233 yr by Delarius
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.