Score:1

Removed all my bash files in home directory (.zsh, etc.). What to do?

cn flag

By accident ran sudo rm *. in the home directory, and now all bash scripts are gone. I still have one tab opened in terminator which seems to have bash history. What can I do to restore it? When new tabs are created in the terminal, it looks broken.

ar flag
Which distro and version of Linux are you using?
cn flag
Ubuntu 21.04 ...
cocomac avatar
cn flag
[21.04 is EOL and off-topic here](https://meta.askubuntu.com/questions/19913/end-of-life-notice-ubuntu-21-04-hirsute-hippo-reached-end-of-life-on-january), but because this [applies to supported Ubuntu versions](https://meta.askubuntu.com/questions/19939/is-it-ok-to-edit-a-question-to-replace-the-ubuntu-spin-off-to-its-ubuntu-equival), I'd support re-opening it regardless
Score:0
in flag

The lack of shell init files doesn't break anything, it just removes features you are probably accustomed to. In particular, the history file doesn't help, it only contains past commands you've run.

You can recreate the shell init files manually, copy them from a backup of your home directory, or copy the defaults from /etc/skel/

Zsh may also have its own procedure for recreating these, so possibly logging in again my trigger that.

Score:0
cn flag

User10489's answer is more practical and probably should be explored first.

...But if that doesn't work out, (a slightly more nuclear option) you could always just make new user and copy your data files over. Your system is still there, you just somewhat broke that particular account...

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.