[ Сураба 🦀]
Open in Telegram
231
Subscribers
No data24 hours
+27 days
+1130 days
Posts Archive
231
🔅 The Excel Bootcamp: Zero to Mastery
⏲ 20 hours 📁 163 Lessons
📔 The only course you need to become an Excel and Data Analysis master. Learn Excel Formulas and Functions, Data Visualization, Pivot Tables, VBA Macros, and much more. Start or supplement your career with data analysis and modeling skills so you can get hired.🎙 Taught by: Travis Cuzick 🌟 ZTM Link
231
❓Question: How does the inodes control mechanism work in Linux file systems?
✅Answer: Inodes are a data structure in the file system that stores metainformation about a file (access rights, size, location on disk, etc.).
1️⃣Number of inodes: The file system creates a fixed number of inodes when formatting. If inodes run out, it is impossible to create new files, even if there is free space on the disk.
2️⃣Checking inodes: The df -i command allows you to find out the number of used and available inodes.
3️⃣Increasing inodes: To change their number, you need to recreate the file system with the -i flag, which specifies the size of the inodes. For example:
mkfs.ext4 -i 2048 /dev/sdX231
How to configure rsyslog to create compressed logs.
Preparation
1️⃣Make sure rsyslog is installed:
sudo apt install rsyslog
Most distributions have rsyslog installed by default.
2️⃣Install the gzip utility:
It is used for compression.
sudo apt install gzip
Configuration
1️⃣Adding the omprog module
Open the rsyslog configuration file:
sudo nano /etc/rsyslog.conf
Add a line to load the omprog module if it is not there yet:
module(load="omprog")
2️⃣Creating a compression script
Create a script that will receive logs and compress them:
sudo nano /usr/local/bin/compress_logs.sh
Paste the following code:
#!/bin/bash
while read line; do
echo "$line" | gzip >> /var/log/compressed_logs.gz
done
Make the script executable:
sudo chmod +x /usr/local/bin/compress_logs.sh
3️⃣Configuring rsyslog to use the script
Add rules to the rsyslog configuration to pass logs to the script:
action(type="omprog" binary="/usr/local/bin/compress_logs.sh")
4️⃣Configuring log rotation
Update /etc/logrotate.conf or create a separate file, for example:
sudo nano /etc/logrotate.d/compressed_logs
Add rotation parameters:
/var/log/compressed_logs.gz {
daily
rotate 7
compress
missingok
notifempty
}
Applying changes
After configuration, restart the service rsyslog:
sudo systemctl restart rsyslog
Test
Send a test message to the log:
logger "This is a test message to check log compression."
Ensure that the logs are compressed and written to /var/log/compressed_logs.gz:
zcat /var/log/compressed_logs.gz231
Ghostty is a fast, feature-rich, and cross-platform terminal emulator that uses platform-native UI and GPU acceleration.
https://ghostty.org/download
