Daniel López Azaña

Theme

Social Media

Blog

Category: GNU/Linux

15 most useful Linux commands for file system maintenance

linux-penguin-inside-a-box-tar-gz

One of the most common and tedious tasks of a sysadmin is to prevent file systems become completely full, because when a server runs out of space the consequences are unpredictable. Depending on how you structured the root file system and if it is divided into different partitions or volumes, those consequences will be more or less severe, but in any case undesirable.

In any case it is always better to be safe than sorry, so use tools that perform automatic log rotation as logrotate and custom scripts to monitor and conduct periodic emptying actions to prevent file systems to get full. However, still using these prevention methods it is for sure it will be many times when you will have to act manually to troubleshoot problems.

Still unresolved Shellshock major vulnerability affecting Bash on Linux, Unix and MAC OS X

|
Still unresolved Shellshock major vulnerability affecting Bash on Linux, Unix and MAC OS X

Less than two days after it was detected a vulnerability (CVE-2014-6271) that affects the Bash shell on Linux, Unix and Mac OS X, a patch was released that solves this issue only partially, which forced to report a new vulnerability (CVE-2014-7169) still pending. This issue has quickly gained a simple name by which it will be remembered for a long time: Shellshock or Shell Shock.

The bug was detected by Stephane Chazelas, a Unix and Linux system administrator from Akamai when he found out that Bash erroneously interpreted as a command wich only was data within a variable when entering a specially crafted string in the command line. As a result, everything coming after that string was executed as a command or function by Bash. This allows any attacker to execute commands on your server arbitrarily. It’s true that this can not be done as root, but there are many harmful actions that can be done without root privileges.

How to know how many cores and processors has a Linux box

cpu-cores

The simplest and shortest method to measure the number of processors present on a Linux box, which is also widely extended as it’s part of coreutils is:

Another way to get the same result which also allows us to obtain additional information from our processor are the lscpu command:

Or we can examine the cpuinfo file from /proc filesystem:

There are many additional details about these processors in /proc/cpuinfo file, including the CPU model and number of cores: