Journey of a noob

Learn From Noobs

[Unix/Linux] Remove lines that exist in another file

Posted at # Unix/Linux

Sometimes, we need to make a file not to contain the lines from another file. It is common when we need to remove some configurations from config files. It is easy if there are just a few lines to remove, but it would become tedious and error-prone when there are many lines to remove on multiple hosts. We should use an automated way instead of removing the lines manually. (Of course, we should still verify the final result is fine.)

在 Linux 上還原 home directory 中的 dot files 至預設版本

Posted at # Unix/Linux

我們都是人,少不免會犯錯,你有沒有試過搞砸你的 dot files?我試過,但很幸運,我有恆常備份的習慣,所以我只需要把檔案還原至我的備份版本,恆常備份 dot files 是一個好習慣,你甚至可以把你的 dot files 上傳到 Github。我很幸運有檔案的備份,但如果我沒有備份,那我可以怎樣恢復我的檔案呢?當然,我們可以直接在 Github 上抓別人的的 dot files 來使用,不過,在這篇文章中,我們會教你如何還原 dot files 至系統的預設版本。

Restore dot files in home directory to default on Linux

Posted at # Unix/Linux

We are human. We all make mistakes. Have you ever messed up with your dot files? I did. Luckily, I always have them backed up so that I can restore them when I need. It is a good idea to save your dot files somewhere. You can even put that on your Github. I was lucky, but how could I restore my dot files to default if there were no backups? Of course, we can go to Github and download a copy of dot files from someone else, but in this article, we will teach you how to restore your dot files to default locally.