"How do I recover lost files from a restarted Mac after terminal work?: [...]When I switched it back on everything was gone except for my applications, but the laptop is almost brand new now and I have my final project to submit right now. Please help me guys I need to get my files back immediately and my logins."
-------
Finding Lost Files:
If no backup...
A. Try Spotlight Search:
[Hold Down +command + Press: spacebar] > Type a file name > Press return. Anything Pop Up?
Learn More Here: Search with Spotlight on Mac - Apple Support
If you get nothing, then try rebuilding the Spotlight Index. Go Here: Rebuild the Spotlight Index on your Mac - Apple Support
B. Try Safe Mode:
In Safe Mode, login items do not run, and corrupt system files(i.e. caches) are intentionally reset as a way to fix issues. Go here: Start up your Mac in Safe Mode - Apple Support
- Boot: in to Safe Mode
- Log in: as same user
- Wait: 30 seconds
- Restart; your Mac
- Log in: as same user
- Search for the files
C. Try Another User:
Create a new Administrator user, and see if you can see these files through Finder. You'd have to create an Administrator account for this. Go Here: Add a user or group on Mac - Apple Support
As a last resort...
D. Reinstall the macOS:
Finder may have a few bug in it, so to fix that, one option would be to reinstall the macOS to fix any bugs in this app. Nothing would be lost. It's just that misplaced items would be placed back to where they should be and corrupt system files would be replaced by clean files. Go Here: Reinstall macOS - Apple Support. Boot into Recovery Mode (Intel or Silicon). Important: Prior to installing an update or performing a reinstallation, to prevent data loss, be sure to Back up your Mac with Time Machine.