Problem
User home directory and everything in it were deleted
Explanation:
The command rm -rf ~
performs the following actions:
rm
: This is the command used to remove files or directories in Unix-like operating systems.
-r
stands for "recursive," which means it will delete directories and their contents recursively.
-f
stands for "force," which means it will delete files without prompting for confirmation.
~
: This is a shorthand notation for the user's home directory. In
Unix-like systems, ~ represents the home directory of the current
user.
What Now?
- Stop using the system (explained below)
- Create a Live Boot USB flash drive - ref
- Boot to the flash drive
- Recover data
- Verify data is back
- Create a separate post for the headset issue connecting with Skype
Recover Data
Here's a previous post for recovery:
How to recover deleted files?
Where is the Recycle Bin?
TLDR Linux doesn't have one
Ubuntu (or any Unix-like system) does not have a specific location where deleted files and directories are stored after deletion. They remain in the same location on the disk until their space is reused for new data. Once the space is reused, the deleted data becomes more difficult or impossible to recover.
If you've accidentally deleted files or directories and want to attempt recovery, it's crucial to stop using the system immediately to prevent further data loss and use recovery tools like photorec from a live environment or another system to minimize the risk of overwriting the deleted data.
history
on command line and add the commands into the question.rm -rf ~/.config/pulse/
is good but if there is a space after the~
that could spell trouble. And this likely needs a backup If not do NOT touch the disk make add
from a live usb and run testdisk on that copy. – Rinzwind Mar 15 '24 at 17:30~
and~/
are essentially the same i.e. your entire home directory ... @Rinzwind you seem to have cracked it. Please consider posting an answer. – Raffa Mar 15 '24 at 17:59