Putty : Connect Linux Server from Windows Computer

Putty : Connect Linux Server from Windows Computer Here is video to show how to connect Linux server from Window   Putty is free tool to connect Linux server. You can down putty from below link: https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html  

curl api using variable post/get method

HI every one there are lot of confusion about curl may be you understand easily …    $url= “phone=$phone&leadid=$leadid”; //initialized other variable $header = array(“Accept: application/json”);                        //optional for json format. $ch = curl_init();                        … Read more

The break Statement in C

break statement in c

While writing C program, We often come across situations where we want to jump out of a loop instantly, without waiting to get back to the conditional test. The keyword break allows us to do this. When break is encountered inside any loop, control automatically passes to the first statement after the loop. A break … Read more

The Odd Loop in C

the odd loop in

Uses of Odd Loop In real life programming one comes across a situation when it is not known beforehand how many times the statements in the loop are to be executed. This situation can be programmed as shown below: /* Execution of a loop an unknown number of times */ main( ) { char another … Read more

Nesting of Loops in C

nesting of loop

The way if statements can be nested, similarly whiles and for can also be nested. To understand how nested loops work, look at the program given below: /* Example of nested loops */ main( ) { int r, c, sum ; for ( r = 1 ; r <= 3 ; r++ ) /* outer loop … Read more

convert backslash to forward slash vice versa

Hi Guys, this is very easy method to replace the special character with in string  . Example $var  = “/var/xyz/html/uploaddata/xyz.html”; “/”replace with “-”  $str = str_replace(‘/’, ‘-‘,  $var); result is -var-xyz-html-uploaddata-xyz.html Example     $var  = “var-xyz-html-uploaddata-xyz.html”; “-“replace with “/” $str = str_replace(‘-‘, ‘/’,  $var); result is /var/xyz/html/uploaddata/xyz.html “/”replace with “\”  Example $var  = “/var/xyz/html/uploaddata/xyz.html”; $test = str_replace(‘/’, “\\”, $var … Read more

grep : Linux Command

grep linux command

Searching Inside the File/Files in Linux  grep prints the matching lines Let’s have some example to understand this: Example 1: To Search for the given string in a single file  Let me create a file eduguru.sh. $ cat eduguru.sh #!/bin/bash fun() echo “This is a test.” # Terminate our shell script with success message exit 1 fun() Now … Read more

rsync : Linux Command

rsync command

rsync = Remote Sync This is a remote and local file synchronization tool. It uses an algorithm that minimizes the amount of data copied by only moving the portions of files that have changed. This is a very flexible network-enabled syncing tool. Due to its ubiquity on Linux and Unix-like systems and its popularity as … Read more

cd : linux command

cd command

cd : Change Directory The cd command, which stands for “change directory”, changes the shell’s current working directory. It is a builtin command, which means that it is executed directly by your shell, instead of launching an external program. cd is a command-line OS shell commandused to change the current working directory in operating systems such as … Read more