MacOS – How to restore the deleted .bash_profile

bashmacos

I have deleted my .bash_profile with rm command and copied another one to use. But now i remember there is some PATH thing in the previous file :(. Can i find the deleted .bash_profile in some place like Trash?

Best Answer

When you do rm on a file, it is immediately unlinked from the file system and gone for good.

The Trash is a Finder Idiom that is not available in a unix terminal session. The only way to restore your file is by restoring it from a backup.