0

I had a workspace folder named ros2_ws1 (~10GB) that was in the Trash folder on my Ubuntu system. After about 3 days, I noticed it’s no longer visible in Trash, but I did not manually delete or empty the Trash.

How can I check if this folder was permanently deleted by the system or removed automatically?

Is there a way to recover or undelete this folder if it’s been deleted?

What tools or commands can I use on Ubuntu to scan for or restore deleted files/folders?

1 Answers1

0

There is no notion of "permanently deleted".

If you put a file into your trash, under the hood, it is just moved into your Trash directory. Your trash application is just a view of this directory. Your file manager (e.g., nautilus, doplhin, ...) support trash:// URL to inspect this folder. Then, open a terminal from the current directory and run pwd to the folder trash name.

Otherwise, your file is supposed to be removed. In practice, removing a file (e.g., using the rm command) only delete its inode from your filesystem (hence, the deletion is very quick). Thus, the file contents might still be there (if no data has been written there in the meantime). In this case, depending on the filesystem or the nature of the file (e.g., an image, which starts with a specific sequence of bytes), some tools might recover it. See How to recover deleted files?.