/images/logo.png

POWERSHELL TEST NET CONNECTION

From Microsoft documentation: The Test-NetConnection cmdlet displays diagnostic information for a connection. It supports ping tests, TCP tests, route tracing, and route selection diagnostics. Depending on the input parameters, the output can include the DNS lookup results, a list of IP interfaces, IPsec rules, route/source address selection results, and/or confirmation of connection establishment. To mimic the Telnet command one can use: 1 Test-NetConnection -ComputerName <HOSTNAME OR IP> -InformationLevel "Detailed" -Port <DESTINATION PORT> Test ping connectivity with detailed results

POWERSHELL HANDLE FILE CONTENTS

How to add contents to a fileTo add contents to a file we can use the Add-Content cmdlet. 1 Add-Content -Path C:\path_to_destination_file "Content to be added" How to add the contents of a file to another fileTo get a file contents we can use the Get-Content cmdlet. 1 Get-Content C:\file_to_source | Add-Content -Path C:\path_to_destination_file NoteThis is similar to use cat and redirection >> in the Unix world. 1 cat /file_to_source >> /path_to_destination_file How to combine the above two commands 1 Add-Content -Path C:\path_to_destination_file "Content to be added"; Get-Content C:\file_to_source | Add-Content -Path C:\path_to_destination_file

DOCKER 101 - BASIC COMMANDS

Docker commandsIn the article DOCKER 101, I wrote about the basics of Docker and its components. In this article I will cover a set o Docker basic commands very useful for any kind of usage. Docker command line structureThe old way: 1 docker <command> (options) The new recommended way: 1 docker <command> <sub-command> (options) Checking the Docker versionThere are two possible ways to check the version of docker is currently installed: docker version and docker --version.

DOCKER 101

IntroductionThe purpose of this article is to give you a basic understanding of Docker, its components, and how it can be used to improve the development and deployment of applications. Docker is a platform for developing, shipping and running applications. It provides a way to package applications and their dependencies into a lightweight, portable container that can run on any infrastructure. Docker has become increasingly popular in recent years due to its ability to streamline the development process, increase deployment efficiency, and improve collaboration between teams.

LIST FILES WITHIN GZIP

List files within gzipHow to list the files within a compressed gzip file without extracting it and get information like the timestamp and permissions? To achieve this, we can use a tool called zcat. Looking to its help session we can see: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 zcat --help Usage: /usr/bin/zcat [OPTION]... [FILE]... Uncompress FILEs to standard output.

LINUX, HOW TO FIND FILES BY AGE

Find files by ageA while ago I needed to find old files in a Linux server. The find utility have the -mtime option to complete this task. Here’s an example command: 1 find /path/to/directory -type f -mtime +730 Running this command will list all the files in the specified directory (and its subdirectories) that are older than two years. Let’s break down the command: find /path/to/directory: Search recursively starting from the specified folder.