Most Useful Linux/Unix Commands

Here is the list of commonly used commands on Unix/Linux systems.

1. Split File based on number of lines 

  If you want to split text file "abc.txt" containing 50 lines by each line use the below command
csplit abc.txt 1 {49}

2. Find out Top 10 Memory intensive processes 

  If you want to figure out which are the top 10 memory consuming processes use the command below
ps -eo pid,ppid,cmd,%mem,%cpu --sort=-%mem | head
You can change mem with cpu for top CPU consuming processes.

3. Curl command to skip SSL Certificate check (HTTPS)

You can skip the SSL Certificate check by providing -k parameter to curl as below.
curl -k --location --request GET 'https://your.web.com'

This post will be forever updated as and when I find new useful commands.

No comments:

Post a Comment

Golang: Http POST Request with JSON Body example

Go standard library comes with "net/http" package which has excellent support for HTTP Client and Server.   In order to post JSON ...