Category: Tech

  • Split Text Data into Columns Using Microsoft Excel

    Split Text Data into Columns Using Microsoft Excel

    Split out data from Excel

    A common task to perform is when you have data in a text file and you need to copy and paste the data into excel and then split the date into columns. Unfortunately, when you do this it will put all the date in a single column. You have to then split out the date into columns using the below method.

    Process

    Highlight and copy date from notepad.

    Paste data into excel. All data will be pasted into the first column only!

    Select data, text to column, delimited, and then next.

    Select the items you want to use as separators, usually tabs and spaces. Then hit next or finish.

  • Synchronize the Time & Date in Ubuntu

    Synchronize the Time & Date in Ubuntu

    Understanding Time

    Time is a critical component of every computer. When to run updates, launch scheduled tasks, or just to keep user’s informed, are all dependent on time.

    Every computer has a built in clock on the motherboard, usually powered by a battery, to keep track of the time. This hardware based clock is called the Real Time Clock (RTC) and is used to power the human readable ‘system time’, based on time zones.

    • System Time = Uses Time Zones
    • RTC = Real Time Zone = Uses Hardware clock

    Unfortunately, the hardware clock will always eventually get out of sync with real time and need to be adjusted. This occurs because of power outages, battery on the MB dies, or other reasons.

    Ubuntu Settings

    Two commands are used to control the date and time. First, the ‘timedatectl‘ command is used to set the time zone. Next, the ‘timesyncd‘ command is used start or stop the sync service and to turn on or off the network time protocol (NTP).

    An older process to manage these functions is called ntpd. While this process is still supported, it is recommended to use the newer methods.

    Check Your Time Zone

    In the United States, there are three primary time zones.

    • UTC (Universal Time Coordinated)
    • EDT (Eastern Daylight Time) = 2nd Sunday March to 1st Sunday in Nov. = 4 hr behind UTC
    • EST (Eastern Standard Time) = 1st Sunday Nov to 2nd Sunday March. = 5 hr behind UTC

    Get a list of available time zones

    Change the Time Zone

    Check the Sync & NTP Services

    Note: Typically, the Real Time Clock or ‘RTC in local TZ’ should always be set to ‘no’. This is due to that most of the US uses spring/fall time changes and the RTC does not know anything about that.

    Turn on the ‘System clock synchronized’

    Check that there is a name server or two listed in the configuration file. The entries should be space separated.

    Add the following lines under [Time]:
    NTP=ntp.myserver.com time.nist.gov

    Next, run the below command.

    Turn on the ‘NTP Service’

    Verify the Clock is Synced

    Ref: https://www.linuxfordevices.com/tutorials/ubuntu/set-up-time-synchronization-ubuntu

    Ref: https://opensource.com/article/20/6/time-date-systemd

    Ref: https://ubuntu.com/server/docs/about-time-synchronisation

  • Analyze Network Traffic using TCPDump

    Analyze Network Traffic using TCPDump

    The Basic

    TcpDump is a command line network monitoring tool for viewing packets, in real time, as they pass through the server network interface. Specifically, it can be used to view and record packets going into and out of a network interface and can be used to conduct all sort of analysis.

    I use this tool to see if logs are actually coming into a server, typically over syslog, and what port are they being received on or are going to.

    Inbound traffic from IP 10.16.28.143

    -i = listen on network card ens160
    -n = do not translate IP address to DNS names
    -nn = do not translate IP to DNS names or ports to service names
    -v = verbose

    Inbound traffic to a specific port

    Either inbound or outbound traffic to/from port 12011

    Outbound traffic to IP 10.16.1.121

    Outbound traffic on port 443

    Only capture TCP outbound traffic going to IP 10.10.192.30 on port 443.

    See if you are getting syslog data

    Only capture data coming from subnets 10.10.149.0/24 or 10.10.153.0/24 and arriving on port 514.

    Outbound traffic going to port 443

  • Customize Your VIM Settings

    Customize Your VIM Settings

    Introduction

    VIM is a popular Linux text editor program. Users can customize VIM by creating a .vimrc file in their home directory. Then, when launching VIM, it will load any variables that were preset in this file. You’ll need to set the file permissions of the .vimrc file to rw-rw—-.

    A sample .vimrc file

    In my opinion, the two most useful commands are to set line numbers on the file and set the color scheme, to make files easier to read. Here is how you set them up in the .vimrc file.

    Get a list of available color schemes

    VIM comes with several color schemes loaded by default. You can also download others. To check what defaults are available, use this command.

    References

    https://phoenixnap.com/kb/vim-color-schemes

    https://thelinuxcode.com/vimrc_tutorial

  • File, Processes, & System Details in Ubuntu

    File, Processes, & System Details in Ubuntu

    Introduction

    When working with systems, for troubleshooting, performance tuning, or regular maintenance, it’s often essential to gather key system information. This includes details such as the operating system version, hardware specifications, running processes, or file system disk usage. You might need to monitor CPU usage in real time or check how much storage space is available on your drives.

    Fortunately, there are a set of powerful command-line tools that make this process quick and efficient. Below, we’ll explore some of the most useful commands to help you monitor and manage your system effectively.

    What is OS Linux version

    Get the installed memory (RAM)

    Get a CPU count

    Get the hard drive details

    Get disk space usage by directory

    disk space used by the specified files and for each subdirectory.

    Monitor Processes using TOP

    Just run the command ‘top’ or ‘htop’ , if it is installed, to get real time Mem and CPU usage and see what process are resource hogs.

  • Change Windows Cmd Line Startup Folder

    Change Windows Cmd Line Startup Folder

    Change Default Startup Path for Command Prompt

    Right click on the command prompt then select properties. On shortcut tab, change “Start in:”