When you make use of the rm (remove) command on the Mac Terminal, the files and folders are permanently deleted, you will not be finding them in the Trash. This can be really risky if you remove a folder or a file that is important by mistake because you may not be able to recover them.
In such cases, it is better to make use of the mv command instead of rm to move files and folders to the Trash folder. You can find the trash folder under your home directory. It is a hidden folder with the name .Trash.
Let's see some examples of moving files and folders to Trash using the Mac Terminal Command.
Move file to Trash using Terminal
% mv myfile.txt ~/.Trash/
Move a folder to Trash using Terminal
% mv myfolder ~/.Trash

Provide Feedback For This Article
We take your feedback seriously and use it to improve our content. Thank you for helping us serve you better!
😊 Thanks for your time, your feedback has been registered!
Comments & Discussion
Facing issues? Have questions? Post them here! We're happy to help!