Category: Linux

How to Expand Alibaba Cloud Disk Online on a Linux System

When we expand a disk on Alibaba Cloud, the system does not automatically extend the filesystem after the purchase 鈥?we need to perform the operation manually.
First, install the required expansion utility for the system. Here using CentOS as an example: yum install cloud-utils-growp …

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 …