I'm working on a bash script that appends to /etc/profile
, but instead of appending, I accidentally wrote over it, losing all of its content.
How can I restore the file? Is there a system default profile that I can copy to restore my /etc/profile
?
I did search here but being new to Ubuntu, I don't know if the posted /etc/profile
content I see in other questions is the default content.
grep /etc/profile /var/lib/dpkg/info/*.postinst
shows/var/lib/dpkg/info/base-files.postinst
, which in turn has a function copyingprofile
from/usr/share/base-files
to/etc/passwd
(among other such files).