Skip to main content

Posts

Showing posts from July, 2024

How to trim leading and trailing spaces

How to trailing spaces, leading space or both on a CSV file or any text file? Notepad++ can easily do this task without any fuss. Can be done easily in 3 clicks, provided you have Notepad++ installed on your system. Notepad++ can easily be downloaded just search Notepad++ on your favorite search engine. Or try visiting this link: https://notepad-plus-plus.org/downloads/v8.6.7/ If your file that needs to be trimmed with leading or trailing spaces or both is on CSV or in a text file format, just export it or copy to Notepad++. For the sake of clarity and for anyone of what's trailing or leading space means. Leading spaces, are the spaces that are inserted at the front of any string. Since spaces are typically not shown on any editor, unless some settings are set to on the editor to show the spaces.So, leading spaces may appear like its not align to the left or beginning of any editor. While trailing spaces, appear at the end of the string. One way to check if the string has ...

Linux VM always disconnected after a few seconds or minutes

VM on VMware or vSphere always got disconnected after a few seconds or minutes. CentOS or RHEL VM cannot be accessed via SSH and unable to activate or make the Interface UP. Typing: ip link show nmcli dev status nmcli gen staus Shows that VM interface is not yet UP. Typing: ip link set ens192 up Will bring the interface UP but still SSH is not working and not able to reach the VM. Typing: nmcli con up ens192 Shows "STATE" connecting but will never shows "connected". Restarting the VM and creating new interface will not help either. Typing: nmtui (network manager text user interface) It shows that the interface has been assigned with correct IP Address, DNS and Gateway But the VM still not available on the network and SSH cannot access to the VM. Well the solution, might just be an overlooked by configuring so fast the VM that a simple option was not carefully set. If the VM was set with IP Address, DNS and Gateway manually, however, ...