I wanted to be able to clear the whole line, so I googled.
Ctrl+U will clear the line for you.
Along with it, I found that you can undo what you have done with Ctrl+_
Ctrl+W clears a word to the left up to the point where it has a space.
Tech Notes of Mine
I wanted to be able to clear the whole line, so I googled.
Ctrl+U will clear the line for you.
Along with it, I found that you can undo what you have done with Ctrl+_
Ctrl+W clears a word to the left up to the point where it has a space.
I’ve been doing a lot of research on how we could get Jenkins to work on Docker. There are people out there who have already done it and I have surely been able to learn from them.
I would like to summarize what I have learn from different sites and what I have figured out in the last 2 months. I have documented quite a bit of stuff at work but I am going to document some on my own site using my own time for the community.
Let’s see when I can find the time to do it…
I have always had to change the directory color in Linux Terminal when I use ConEmu on Windows because it’s always blue on black background and it’s hard to see. You can edit .bashrc under your home directory to change it to yellow. Just add the line at the end of the file.
LS_COLORS=$LS_COLORS:'di=1;33:' ; export LS_COLORS
If you want to open ports on CentOS 7 (firwalld is enabled by default), run the following command. This is a note for myself.
sudo firewall-cmd --zone=public --permanent --add-port=5000/tcp sudo firewall-cmd --reload
I was under an impression that you can create Dockerfile only with the name “Dockerfile” but you can use -f option to give a different file name.
docker build -f jenkins-master.dockerfile -t jenkins-master:2.138.1 .
This will generate jenkins-master:2.138.1 image locally based on the Dockerfile “jenkins-master.dockerfile”. Content of the Dockerfile is shown below.
FROM jenkins/jenkins:lts USER root RUN apt-get update && apt-get install -y git curl && rm -rf /var/lib/apt/lists/*
What if you want to remove all the containers and images from your Docker host where you are just experimenting? Here is a convenient (and also could be dangerous) script.
#!/bin/bash docker rm -f $(docker ps -a -q) docker rmi -f $(docker images -q)
Try it at your own risk!
Very convenient way to do “find in files” in bash.
grep -rHino 'test'
If you change grep to egrep, you can use regular expression. Very cool!