Zip Without Compression – Windows, Linux, MacOS

If you want to store a big folder as a single file, so it could be easily uploaded somewhere or shared with someone, you can create a simple zip archive from it.

To avoid wasting a time and resources on compression and decompression, this zip archive can be created without compression.

In this short note i will show how to create a zip file without compression from the command line on Windows, Linux and MacOS. (more…)

Save All the Terminal Output to a File – Linux

In Linux terminal you can save not only an output of the individual commands using different types of redirections, but you can also capture and save to a file all the commands executed during a session and their output.

All the commands executed in a Linux terminal and their output can be saved to a file using a script command.

The script command creates a session during which it saves everything displayed on a terminal to a specified file.

In this short note i am showing how to save all the terminal output to a file in Linux using the script command. (more…)

Mount LVM Partition in Rescue Mode

Usually, for the system repair purposes, such as troubleshooting of the boot-related issues (e.g. GRUB rescue) or for data recovery, it is required to know how to mount an LVM partition in a live Linux session (when a system boots from a live CD/DVD or from a special rescue USB stick).

In this article i will show how to identify volume groups and logical volumes on an “external” drive and how to mount the discovered LVM partitions in a rescue mode and get access to the data. (more…)

Linux Rescue USB – Data Recovery & System Repair

Rescue and recovery disks are used for repairing a system and data after a crash on Linux and Windows devices.

They are especially useful for troubleshooting of the boot-related issues and for data recovery.

In this note i will show how to create a bootable rescue USB stick with a SystemRescue (also known as a SystemRescueCD) – a Linux-based rescue toolkit for administrating and repairing of the Windows and Linux-based systems and data recovery. (more…)

How To Find Laptop’s Model & Serial Number – CMD

The laptop’s model and serial number usually can be found on the bottom case of the laptop as either a printed sticker or laser etched into the cover.

Also the model and the serial number of a laptop can easily be found using a Windows command prompt (CMD).

This “command prompt method” works for all the laptop vendors, including: HP, Lenovo, Dell, Acer, Asus, etc.

In this show note i will show how to find the laptop’s model and serial number from the command prompt using the wmic command. (more…)

Outlook: Strikethrough – How to Cross Out Text

In Microsoft Outlook the “Strikethrough” feature allows to draw a horizontal line through the selected text to indicate deleting or changing.

For the new users it may be complex to understand how to cross out a text in an email as the “Strikethrough” button is absent in the “Basic Text” section of the ribbon in the default “Message” tab.

In this note i will show how to locate the “Strikethrough” button in Microsoft Outlook and cross out a text in an email. (more…)

Ansible: Set Variable In Task

Variables in Ansible can be defined in many different places, such as in inventory, in playbooks, in reusable files, in roles, and at the command-line.

Ansible also allows to set variables directly in a task by using the set_fact module.

Variables defined using the set_fact become associated with the host that the task is running against, that makes them available across subsequent tasks for the entire duration of the play. (more…)

Ansible: Compare Version Numbers – Examples

As Ansible is widely used as an automated provisioning and deployment tool, it is quite often required to compare version numbers of different software components.

For example, you may need to check the current version of an application and compare it with the latest one to take a decision if update is required.

To compare versions in Ansible we can use the version test, and in this note i will show the examples of how to use it. (more…)

Sudo Echo “To” > File: Permission Denied [SOLVED]

If you try to echo something to a file that you don’t have permission to write to, you will receive the “permission denied” error.

But, what might seem surprising, if you try to repeat the same echo command with sudo, you will still receive the same “permission denied” error.

The construction sudo echo 'something' > file doesn’t work, because the redirection i.e. > or >>, is executed not by the sudo echo, but by the current user’s shell (that is not running as root). (more…)