tail – output the last part of files. Print the last 10 lines of each FILE to standard output. With more than one FILE, precede each with a header giving the file name. With no FILE, or when FILE is -, read standard input. Tail’s keys Show last ‘num’ lines in file: tail -n {{num}}Continue Reading
Category: For Beginners
The best place to start using Linux / Unix or programming. A lot of tutorials and manuals for beginners. You can ask and do not afraid looks like silly – no one knows everything from his birth.
Notes about basic concepts, explanations. It targets on teaching, helping beginners. More examples, comments and simple code snippets.
Courses of articles about information technologies. Just start and learn more!
Useful keyboard shortcuts in Bash for beginners
Hotkeys in Bash helps you use Bash more efficiency. Most of them have slower analogs. But some of them help you easier do common things. Ctrl + a – Return to the start of the command you’re typing Ctrl + e – Go to the end of the command you’re typing Ctrl + u – Cut everything beforeContinue Reading
Bash history util for beginners
history is a program for tracking terminal input. Many programs read input from the user a line at a time. The GNU History library is able to keep track of those lines. It associates arbitrary data with each line, and utilize information from previous lines in composing new ones. Tips and examples Display the commandsContinue Reading
Useful shortcuts for Beginners in Bash – BANG!
Bash is not the only programming language. The most important it’s a shell. When you run a terminal, you get a bourne-again Shell. And it has special shortcuts and predefined special variables. For example, $? contains the last exit code, $PS1 is a template of Bash prompt. But now we’ll talk about “bang” shortcuts. Examples:Continue Reading
Less utility for beginners
less is a terminal pager program for Linux, MacOS (Unixes) and even Windows. It’s used to viewing (but not changing) the contents of a text file one screen at a time. You can try in you terminal: less /etc/passwd – if you use Unix-like system. Note: press q to quit. Most Linux users know about navigationContinue Reading
Docker commands for beginners
Docker is a container technology for Linux / MacOS / FreeBSD (and even Windows, but not full support) that allows a developer to package up an application with all of the parts it needs. It can also be called “Docker commands cheat sheet“. List currently running docker containers: docker ps List all docker containers (running andContinue Reading
Use quotes when using variables in Bash
Let’s see, what happens when we use / don’t use quotes: ~ $ VAR=”tmp/*”~ $ echo $VARtmp/a tmp/b~ $ echo “$VAR”tmp/* – * gets expanded to whatever matches in the file path. General rule: quote it if it can either be empty or contain spaces (or any whitespace really) or special characters (wildcards). Not quoting strings withContinue Reading
Permissions de fichiers et de répertoires sous Linux / FreeBSD / MacOS
Selon la philosophie Unix “Tout est fichier”. Et elle l’est. Mais il est parfois difficile de comprendre toutes les règles de fournir cette déclaration. Commençons par les problèmes les plus courants que rencontrent les développeurs lorsqu’ils travaillent avec des systèmes de fichiers de type Unix! Commandes de base pour définir les permissions de fichiers PourContinue Reading