ooooh im sorry to say hear this well better than trying to fix something u have no idea where to begin u can use
bootable usb stick to recover ur files then reinstall mostly wont be necessary unless u installed the entire system in /
also next time create partions if u havent already
/
/boot
/var
/home
so that so can reinstall and change only specific partions during installation
or use system recovery image to do the same from the bootloader
will have to probably reinstall also keep backups
Instead of using
rm -rf * postfix.txt # accidental space between
would delete all files
The file name used within quotes is considered as a single file
this will avoid errors like what u did
rm -rf '* postfix.txt'
on the other hand
wont delete bc file by the name *\ postfix.txt
doesnt exist
better to use find
command
find . -name "* foldername/" -type d -exec rm -rf {} \;
or
find . -name "/foldername/ *" -type d | xargs -0 rm -r
Here,
-name = name of file
-type = f for file , d for directory
-exec = to execute commands followed {contains the output from search} \;slash is for closing
| = (pipe operator) used to join two commands like joining a pipe
xargs = is used to execute commands