20 Linux Top Command Examples made easy to remember

Linux “Top” command displays information about the Processor activity.It displays information related to cpu and memory used by the each process.Top Command provides real time view of System Performance.Name of the “Top” command suggests you that,it displays information around processes which uses more cpu and memory.Top command is great utility to find out why Server is crying with… Read More »

25 Linux PS Command Examples,every System Admin Must Know

Every Program,which run’s on linux system, we call it as process.Each process will have its’ own unique process id.We can find out which process currently it is running on the system using “PS” command. With “PS” command,we can find out how many resources it is using like memory and cpu.Sometimes,few processes will take more amount of resources which… Read More »

30 Linux LS Command Pratical Examples Really Useful

“LS” is linux shell command, which we use most of the time.Out of the all of the linux command’s,number one command which every one uses is “LS” command. “LS” which will list the files and folders information in various formats.In Linux,we dont use graphical representation to see whether given file is really a file or folder.so,we have to… Read More »

25 Linux Grep Command Examples Should try in work place

Linux Grep command is mostly used to search for Text Pattern’s/Specific words in set of files.Most of the people dont know the full form of Grep – grep is Global regular expression print.Grep command processes each line by line and prints line which matches the pattern. Let’s go Examples,which we are most interested in. Usage 1: Search for word in a… Read More »

20 Linux Crontab Command Pratical Usages in day to day work

Crontab is a command is used to execute the list of commands at scheduled time.It is file to store the scheduled commands too.Crontab is used by most of the time by System Administrators to schedule the regular server Activities like Backup and Running scheduled jobs. Crontab is daemon process which runs in the background always to check the… Read More »

40 Linux Find Command Practical Examples – Really Helped me

Find Command is most useful command in day to day work on linux machine.Without Find command it is very difficult to find any File.we can find the files by it’s name,permissions it has,Group it belongs,File Type,Size. Whatever we tell about any command,untill we use it with purpose ,it is difficult to understand the use of it. So let’s… Read More »

c program to delete first node from singly linked list

Write ‘c’ program to create singly linked list of “n” elements and delete first node from the singly linked list ( delete head element ). Algorithm to delete first node from singly linked list. Input: Pass Head of the Linked list Begin:                    If  ( head != NULL ) then nodeDelete… Read More »

How to Compile and Run C/C++ Programs on Windows in 60 Seconds

I have struggled for running c & c++ programs using different tools and its difficult configuration.After my research,i found one tool called “MinGW” Software,it has c/c++ compiler suite.It’s very easy to use. All we need to do is Just install the software in 30 Seconds and run your program in next 30 seconds.Before,we go and install this software,lets… Read More »

Printing source code of a C program itself

Problem Statement: Display the current running program as it is. Problem Solution: Read the same program File. Example: sampleTestProgram.c Solution Language: Using C __FILE__ is standard predefined macros are specified by the relevant language.This is the path by which the preprocessor opened the file, not the short name specified in ‘#include’. FYI: All pre defined macros start with… Read More »

Minimum number of swaps required to sort an array

Problem Statement Here Swap means removing element from array and append it to the back of the array. Given an array of integers find the minimum number of swaps needed to sort the array. Example 1: Input Array Example[] = [7,3,4,1]  By swapping 1 and 7, we get [1,3,4,7]. So,here one swap is the best solution. Example 2:… Read More »