Tag Archives: terminal

Use awk instead of cut to cut out specific columns of a file

Use awk instead of cut to cut out specific columns of a file | For separating out specific columns of a file, try using awk! The command to use is: $ awk ‘{print $9,$10}’ file.txt > file_cut.txt Where 9 or 10 indicates the ninth or tenth column of a text file. For an example, say you have the output of an ls -l: drwxr-xr-x 13 root root 4096 Jun

How to install host, nslookup and other BIND tools on Windows

How to install host, nslookup and other BIND tools on Windows | For a Linux admin using Windows, cygwin unfortunately does not provide host, nslookup, or other bind tools. I’ll show you how to download these BIND tools directly from ISC and have them work in your cygwin terminal! Note: this assumes you already have a working cygwin install. First, download the latest version of BIND for

Encode or Decode base64 from the Command Line

Encode or Decode base64 from the Command Line | If you have ever needed to quickly decode or encode base64, Linux has a command line utility called base64 that works great. I’ll show you how it works! To encode text to base64, use the following syntax: $ echo ‘scottlinux.com rocks’ | base64 c2NvdHRsaW51eC5jb20gcm9ja3MK To decode, use base64 -d. To decode base64, use a syntax

Perform DNS Lookups with the host command

Perform DNS Lookups with the host command | The dig command is commonly used to make DNS queries. However, a much overlooked command is the host command. Here are some quick tips for a useful tool to add to your bag of tricks or to impress your friends. The syntax is: $ host [domain.com] When run with no options, a simple quick summary

OS X Monitor Virtual Memory Usage from Command Line

OS X Monitor Virtual Memory Usage from Command Line | OS X has a simple command line tool to monitor virtual memory usage: vm_stat. I’ll show you how it works! Crack open a terminal and run vm_stat. You will see an output somewhat like below: $ vm_stat Mach Virtual Memory Statistics: (page size of 4096 bytes) Pages free: 54492. Pages active: 541989. Pages inactive: 155818.