background preloader

Linux

Facebook Twitter

Advanced Bash-Scripting Guide. An in-depth exploration of the art of shell scripting Mendel Cooper 10 Mar 2014 This tutorial assumes no previous knowledge of scripting or programming, yet progresses rapidly toward an intermediate/advanced level of instruction . . . all the while sneaking in little nuggets of UNIX® wisdom and lore.

Advanced Bash-Scripting Guide

It serves as a textbook, a manual for self-study, and as a reference and source of knowledge on shell scripting techniques. The exercises and heavily-commented examples invite active reader participation, under the premise that the only way to really learn scripting is to write scripts. Sort Files Like A Master With The Linux Sort Command (Bash) If you do your development work in Linux, there are certain commands that you owe it to yourself to master fully.

Sort Files Like A Master With The Linux Sort Command (Bash)

There are a number of these with the main ones being grep, find and sort. Just about everyone has at least a passing familiarity with these commands, but with most people the knowledge is superficial, they don't even realise how powerful those commands can be. So, if you really put in the effort to master them, not only will you make your own life much easier, but you will also be able to impress all you friends with your elite Linux skills when you pair with them :).

Bash:tip_colors_and_formatting - FLOZz' MISC. The ANSI/VT100 terminals and terminal emulators are not just able to display black and white text ; they can display colors and formatted texts thanks to escape sequences.

bash:tip_colors_and_formatting - FLOZz' MISC

Those sequences are composed of the Escape character (often represented by ”^[” or ”<Esc>”) followed by some other characters: ”<Esc>[FormatCodem”. In Bash, the <Esc> character can be obtained with the following syntaxes: \e \033 \x1B Examples: NOTE¹: The -e option of the echo command enable the parsing of the escape sequences. NOTE²: The ”\e[0m” sequence removes all attributes (formatting and colors). Manipulating Strings. Extracts substring from $string at $position.

Manipulating Strings

If the $string parameter is "*" or "@", then this extracts the positional parameters, starting at $position. Extracts $length characters of substring from $string at $position. The position and length arguments can be "parameterized," that is, represented as a variable, rather than as a numerical constant. Manipulating Strings. MichielDerhaeg/build-linux. Linux PAM Easy Guide - Like Geeks. In the previous post, we talked about Linux iptables firewall, and some people asked about authentication.

Linux PAM Easy Guide - Like Geeks

Sans titre. Regular Expressions. Your browser does not have Javascript enabled.

Regular Expressions

I use Javascript for analytics, and to show ads which pay for the maintenance Table of Contents. HOWTO_Troubleshoot_SUDO – SSSD. Check if configuration of sudo and SSSD cooperation is correct ¶ To check whether the basic configuration of sudo and SSSD is correct, check /etc/nsswitch.conf and /etc/sssd/sssd.conf files.

HOWTO_Troubleshoot_SUDO – SSSD

/etc/nsswitch.conf must say that sss module is used for sudo service. Parameter expansion. Introduction One core functionality of Bash is to manage parameters.

Parameter expansion

Lesson 8: Expansion. Each time you type a command line and press the enter key, bash performs several processes upon the text before it carries out your command.

Lesson 8: Expansion

We have seen a couple of cases of how a simple character sequence, for example “*”, can have a lot of meaning to the shell. The process that makes this happen is called expansion. With expansion, you type something and it is expanded into something else before the shell acts upon it. To demonstrate what we mean by this, let's take a look at the echo command. echo is a shell builtin that performs a very simple task.

It prints out its text arguments on standard output: Screen. Screen (GNU Screen) est un « multiplexeur de terminaux » permettant d'ouvrir plusieurs terminaux dans une même console, de passer de l'un à l'autre et de les récupérer plus tard.

screen

Il offre d'autres services très utiles comme : La possibilité d'attacher et de détacher une session, pratique par exemple pour reprendre la main sur un client IRC tel que Irssi ou Weechat. La possibilité de partager un terminal avec un autre utilisateur, idéal pour aider un utilisateur distant. Introduction to if. 7.1.1. General At times you need to specify different courses of action to be taken in a shell script, depending on the success or failure of a command. Aide-mémoire des commandes Linux. Sed - An Introduction and Tutorial. Your browser does not have Javascript enabled. I use Javascript for analytics, and to show ads which pay for the maintenance Last modified: Thu Apr 23 16:37:48 EDT 2015 Quick Links Table of Contents Note - You can click on the table of contents sections to jump to that section.

Then click on the section header of any section to jump back to the table of contents. Copyright 1994, 1995 Bruce Barnett and General Electric Company Copyright 2001,2005,2007,2011,2013 Bruce Barnett All rights reserved. How to Extend/Reduce LVM's (Logical Volume Management) in Linux - Part II. Previously we have seen how to create a flexible disk storage using LVM. Here, we are going to see how to extend volume group, extend and reduce a logical volume. Here we can reduce or extend the partitions in Logical volume management (LVM) also called as flexible volume file-system.

Requirements. Linux/Documentation at master · torvalds/linux. Linux/vm.txt at master · torvalds/linux. Introduction to Linux.