Jun 242014
 

A not so common guide, article by   first posted on http://www.refining-linux.org

The UNIX philosophy is based on the DRY principle which declares: “Don’t repeat yourself”. Therefore, a program just does what it’s made for and uses libraries or even other programs on your system to do a more advanced job. Some of these auxiliary programs are user definable and probably you already know the EDITOR environment variable, which specifies your default editor for the console. This is used, e.g., for the command visudo, which opens your /etc/sudoers file safely, or by svn to input a commit comment. But another important component is your console pager, which is used to display textual content on the console.

As a system administrator or a more advanced Linux user you surely know man and how to use it. man shows you the (probably localized) contents of your system’s manual pages for a specific command or file, at least you might think so, but actually that’s wrong or let’s say: not completely the truth. man selects which manpage to show, but the display itself is managed by your pager. Of course, not only man makes use of the pager, also commands like mail use it (which might not exist on your system if you don’t have an MTA installed), so this is a very basic program.

I assume, you have already used your pager very often, which is nothing else than more, less or lv (which is also a good pager but very seldom installed by default and therefore rarely known). Most of the time, you use them to display the contents of log files or configurations, which you don’t want to alter, but that’s not all. As mentioned before, other programs use your pager as well and there is a way to configure which one to take and of course also how to use it.

Continue reading »

Flattr this!

Jun 102014
 

slackarchArticle by Velimir Baksa

On many sites there are a lot of information about Ubuntu or its successor, Mint, these distributions are excellent, very good for those who have never seen anything on Linux, but maybe someone could be more interested in having a greater freedom of action and try something that goes beyond a well-marked path, so what do you think of the GNU/Linux Arch and Slackware distributions ?

Many things are spoken around Arch and Slackware. And also many myths are around surrounding these two distributions, for someone they are hard to install, hard to use, hard for administration, good only for geeks.

Many myths about Arch/Slackware and I should say also Gentoo aren’t true. Both, Arch and Slackware, bring only the best to the operating system experience. BSD elegance and Linux kernel. Great customization, great user experience and unique philosophy. Today quality and simplicity don’t go together. But let’s take a look at some of the main aspects of a GNU/linux Distribution.
Continue reading »

Flattr this!

May 292014
 

Today I want to repost for my readers a really interesting article by Gionatan Danti first posted on his blog http://www.ilsistemista.net/, I hope you enjoy it as much as I do

File compression is an old trick: one of the first (if not the first) program capable of compressing files was “SQ”, in the early 1980s, but the first widespread, mass-know compressor probably was ZIP (released in 1989).

In other word, compressing a file to save space is nothing new and, while current TB-sized, low costs disks provide plenty of space, sometime compression is desirable because it not only reduces the space needed to store data, but it can even increase I/O performance due to the lower amount of bits to be written or read to/from the storage subsystem. This is especially true when comparing the ever-increasing CPU speed to the more-or-less stagnant mechanical disk performance (SSDs are another matter, of course).

While compression algorithms and programs varies, basically we can distinguish to main categories: generic lossless compressors and specialized, lossy compressors.

If the last categories include compressors with quite spectacular compression factor, they can typically be used only when you want to preserve the general information as a whole, and you are not interested in a true bit-wise precise representation of the original data. In other word, you can use a lossy compressor for storing an high-resolution photo or a song, but not for storing a compressed executable on your disk (executable need to be perfectly stored, bit per bit) or text log files (we don’t want to lose information on text files, right?).

So, for the general use case, lossless compressors are the way to go. But what compressor to use from the many available? Sometime different programs use the same underlying algorithm or even the same library implementation, so using one or another is a relatively low-important choice. However, when comparing compressors using different compression algorithms, the choice must be a weighted one: you want to privilege high compression ratio or speed? In other word, you need a fast and low-compression algorithm or a slow but more effective one?

In this article, we are going to examine many different compressors based on few different compressing libraries:

  • lz4, a new, high speed compression program and algorithm
  • lzop, based on the fast lzo library, implementing the LZO algorithm
  • gzip and pigz (multithreaded gzip), based on the zip library which implements the ZIP alg
  • bzip2 and pbzip2 (multithreaded bzip2), based on the libbzip2 library implementing the Burrows–Wheeler compressing scheme
  • 7-zip, based mainly (but not only) on the LZMA algorithm
  • xz, another LZMA-based program

Continue reading »

Flattr this!

May 212014
 

Original article by Linux Brigade

Ever have to check a list of Linux servers for various things like what version of CentOS they’re running, maybe how long each has been running to get an uptime report? You can and it’s very easy to get going with it with the command gsh

Group Shell (also called gsh) is a remote shell multiplexor. It lets you control many remote shells at once in a single shell. Unlike other commands dispatchers, it is interactive, so shells spawned on the remote hosts are persistent.
It requires only a SSH server on the remote hosts, or some other way to open a remote shell.
Continue reading »

Flattr this!

May 202014
 

Article based on the original work of  Travis Zajkowski first posted on his blog

As first thing, this is a good definition of subner, from wikipedia:

subnetwork, or subnet, is a logically visible subdivision of an IP network. The practice of dividing a network into two or more networks is called subnetting.

All computers that belong to a subnet are addressed with a common, identical, most-significant bit-group in their IP address. This results in the logical division of an IP address into two fields, a network or routing prefix and the rest field or host identifier. The rest field is an identifier for a specific host or network interface.

The routing prefix is expressed in CIDR notation. It is written as the first address of a network, followed by a slash character (/), and ending with the bit-length of the prefix. For example, 192.168.1.0/24 is the prefix of the Internet Protocol Version 4 network starting at the given address, having 24 bits allocated for the network prefix, and the remaining 8 bits reserved for host addressing. The IPv6 address specification 2001:db8::/32 is a large address block with 296 addresses, having a 32-bit routing prefix. In IPv4 the routing prefix is also specified in the form of the subnet mask, which is expressed in quad-dotted decimal representation like an address. For example, 255.255.255.0 is the network mask for the 192.168.1.0/24 prefix. Traffic between subnetworks is exchanged or routed with special gateways called routers which constitute the logical or physical boundaries between the subnets.

The benefits of subnetting vary with each deployment scenario. In the address allocation architecture of the Internet using Classless Inter-Domain Routing (CIDR) and in large organizations, it is necessary to allocate address space efficiently. It may also enhance routing efficiency, or have advantages in network management when subnetworks are administratively controlled by different entities in a larger organization. Subnets may be arranged logically in a hierarchical architecture, partitioning an organization’s network address space into a tree-like routing structure.

When you configure a server or a service it’s useful to know what’s the complete IP Address, so there are several different Subnet Calculators available for command line use on Linux. Two popular ones are:

ipcalc
sipcalc

Continue reading »

Flattr this!