You can use AWK or grep
awk '/error/' logfilename.txt
or grep
grep 'pattern' logfilename.txt
(read more...)You can use AWK or grep
awk '/error/' logfilename.txt
or grep
grep 'pattern' logfilename.txt
(read more...)In Linux (Debian, Ubuntu) it's very cool to use bash and command line. Recently I wanted to add to archive approximately 3000 'jpg' files, which were named like 'test_2024_06_10 11:22:00'. I didn't want to select so many files manually, so I did it from command line. This is how my command line text looked like:
(read more...)With SSH you sometimes need to add new value to the $PATH variable. When your application is not in the directory, which exists in the $PATH array. If you don't want to write down the full path in the command line, for example, '/home/user/myapps/makephoto', you can add '/home/user/myapps/' to $PATH and then you can execute 'makephoto' easier.
(read more...)Linux 'netstat' command finds out which process is listing upon a port. Obviously, you usually need it when something doesn't allow to start/restart an application or docker.
(read more...)Create a group in Linux with command line :
sudo addgroup nginxusers
sudo usermod -a -G nginxusers newusername
(read more...)How to fix Gitlab CI error during connect: Post http://docker:2375/v1.40/auth: dial tcp: lookup docker on … no such host. I spent more than 1 hour to fix it. And I am totally not sure that I will remember it 🙂
(read more...)Vagrant is a cool application for the automation of the development of the virtual machines. It allows to create a VM for VirtualBox in several seconds or minutes, and it's very cool. But rather other you want to use it offline, otherwise you can use AWS or something like that. So I will write down some notes how to use Vagrant images offline.
(read more...)I will write some useful commands to work with Docker. If I use them often, I will remember them, otherwise I will remember them quickly if I read this post.
(read more...)As it turned out, I can execeute linux scripts at my Windows PC with WSL installed with Powershell!
Just write 'wsl -e ' and after that a command to execute.
(read more...)The short manual how to remove Apache 2 from Ubuntu with bash Linux command line. 4 steps. I advice you to execute all the commands with sudo.
(read more...)