Blog

How to erase line in files containing string recursively in Linux

April 27, 2023

find . -name "*.md" -type f -exec sed -i '/line of text/d' {} \; This command uses find to locate all .md files in the current directory and its subdirectories recursively. The -exec option is used to execute the sed command on each file found. The {} is replaced by the name of each file found, and the \; is used to terminate the -exec option. The sed command removes any line containing the string “line of text” from each file found. ...

How to install PhantomJS on Ubuntu 22.10

April 27, 2023

PhantomJS is a headless web browser for automating web page interactions. To install PhantomJS on Ubuntu 22.10, you can follow these steps: Update your system packages with sudo apt update && sudo apt upgrade Install the required packages with sudo apt install build-essential chrpath libssl-dev libxft-dev libfreetype6 libfreetype6-dev libfontconfig1 libfontconfig1-dev Download the PhantomJS binary file from its official website with wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2 Extract the file to /usr/local/share/ with sudo tar xvjf phantomjs-2. ...

How to delete all files containing string in Linux

April 27, 2023

find -type f -name '*string*' -delete This command will delete all files whose filenames contain the string string. The * character is a wildcard that matches any number of characters. The -type f option tells find to only look for files, not directories. The -delete option tells find to delete the files it finds.

Collaboration in a DevOps Team

January 27, 2023

DevOps is a philosophy that emphasizes collaboration between development and operations teams. The goal of DevOps is to speed up the delivery of software while maintaining high levels of quality and security. Collaboration is key to the success of a DevOps team. One of the most important ways in which development and operations teams can collaborate is through the use of shared tools and platforms. These tools and platforms allow teams to share information and communicate effectively, which is critical for achieving the goals of DevOps. ...

Memento Mori

August 25, 2022

Memento Mori refers to the philosophical reminder of death’s inevitability. You could leave life right now. Let that determine what you do and say and think. It helps you remember the good things without arrogance and to let the bad things go with indifference. You control whether you waste time getting upset by things. And whether you waste time taking things personally.

Amor Fati

August 24, 2022

Amor fati is a phrase that may be translated as “love of one’s fate”. It is used to describe an attitude in which one sees everything that happens in one’s life, including suffering and loss, as good or, at the very least, necessary. You take what you can from life. You use it as fuel. You become better from it. You become improved by it. Make the most of it. Be better for it having happened. ...

How to Resolve "Cannot Unregister the Machine While It Is Locked" Error in Vagrant

February 1, 2022

When working with Vagrant, a tool for building and managing virtual environments, you may encounter an error message that reads “Cannot unregister the machine while it is locked.” This is often accompanied by a block of error messages and command output, as shown below: vagrant destroy default: Are you sure you want to destroy the 'default' VM? [y/N] y ==> default: Destroying VM and associated drives… There was an error while executing VBoxManage, a CLI used by Vagrant for controlling VirtualBox. ...

No good deed ever goes unpunished.

May 21, 2021

“No good deed ever goes unpunished.” Sometimes when you try to do something good or helpful, it can backfire and you end up in trouble or face negative consequences, sadly, even when you have the best intentions. This can happen even when you are trying to be kind or helpful towards those closest to us, such as our parents. It’s an unfortunate reality that good deeds don’t always result in positive outcomes. ...