Sort CLI output by line length

Want to sort file contents by each line’s lenght? No problems: artemn@artemn-laptop:~$ cat /etc/passwd | awk ‘{print length, $0}’ | sort -n | awk ‘{$1=”"; print $0 }’

Read more →

 

FAQ: How to change Duplex and/or Auto-Negotiation NIC settings in Linux?

Q: How to disable auto-negotiation option of my network interface card and set up half/full duplex mode manually from Linux command line (CLI)? By the way, how to see current settings? A: There are several Linux utilities coming with almost any distribution including Debian, Ubuntu, Fedora, RedHat, Mandriva, Centos whatever. See details below. ethtool This is rather powerful utility can display and change settings of ethernet network interface card. You […]

Read more →

 

FAQ: How to scrollback in GNU SCREEN?

Q: I was compiling kernel using GNU Screen utility but something happened during the compilation and I want to see full error’s output but I can’t just scrollback using Ctrl+PageUp. How to scrollback in GNU Screen? A: In GNU Screen press Ctrl + a + [ to enter Copy Mode, then scroll up/down using keys j or k. Below are some other navigation keys: h - Move the cursor left […]

Read more →

 

FAQ: How to install and configure MySQL cluster?

Question: Can you give me more information on how to set up MySQL cluster? Answer: Sure, below are the links to extremely informative Internet resources providing detailed guides on why and how to deploy MySQL cluster. By the way a cluster in IT field is a group of linked computers, working together so they form a single computing system. The components of a cluster are usually connected to each other […]

Read more →

 

FAQ: How to block/allow packets sent by specific Operating System with iptables?

Question: How can I block traffic coming from specific operating system in Linux? In other words, how can I block traffic from Windows users on my firewall and allows other people? Answer: There is an iptables module named OSF (passive OS Fingerprinting) that was written by Evgeniy Polyakov. This module allows passively detect OS packet was sent from and perform various netfilter actions based on this match. Packets with SYN […]

Read more →