Blog Archives

01: 14 Unix must-know interview questions & answers

Q1 How do you remove the Control-M characters from a file?
A1 Control-M is a carriage return on keyboard. The ^M is the keyboard equivalent to \r. In a file originated from DOS/Windows the \r\n is used for an end of line carriage return, whereas in Unix it is \n for a new line.

So, if created a file in DOS/Windows and copied it to a Unix machine, you need to convert the carriage returns from \r\n to \n. You need to remove \r.

Using the sed command that replaces Control-M with nothing

Tags: ,

02: Top 10 Linux interview Q&As

Many production systems run on Linux systems, especially the Cloud infrastructure (i.e. AWS & GCP). Even Android uses the Linux kernel under the hood. So, it really pays to have a good knowledge of Linux.

Q1. How do you check for open ports in Linux?
A1. With the netstat command. In general you will be using the following:

03: Shell script interview Q&As for Java developers

Q1 How will you go about reading a CSV file as shown below?


300+ Java & Big Data FAQs - Quick Prep

Java & Big Data Tutorials