Category: System

Linux (238)
Windows (383)

How to Filter and Query Large Log Files in Linux

Sometimes log files can be very large and opening them directly might freeze your system. In such cases, you can use the following commands to query the file: grep -aE '2022-03-10 15:18' wechat_open.log or cat wechat_open.log | grep -a '2022-03-10 15:58' …

How to Lock Files in Linux

To prevent accidental server operations on specific files by disallowing any changes, you can try locking the file as follows. chattr +i config.php #Using config.php as an example, -i removes the lock: chattr -i config.php #Using config.php as an example. lsattr #Check …

How to Install the Latest Node.js on CentOS 7 Using Yum

First, check the available versions on the website below (newer versions are generally listed): https://github.com/nodesource/distributions/tree/master/rpm Then run the following in the terminal (using Node.js 12 as an example): curl –silent –location https://rpm.nodesource.com/setup …

How to Use the UFW Firewall

ufw is the default firewall in Debian and Ubuntu Linux distributions. Below, we’ll look at some commonly used commands.

ufw enable #Enable ufw on boot
ufw allow 22/tcp #Allow all access to port 22
ufw default deny #Deny all by default
ufw allow from 10.0 …