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

CP : Linux Command

cp command

cp command under a Linux, UNIX-like, and BSD like operating systems is used to copy files and directories . cp is the command entered in a Unix and Linux shell to copy a file from one place to another, possibly on a different filesystem. The original file remains unchanged, and the new file may have the same … Read more

PWD : Linux Command

pwd

pwd prints the full pathname of the current working directory. In Unix based system like linux and some other operating systems, the pwd command writes the full pathname of the current working directory to the standard output. pwd = print working directory.      

Disable SELinux in Linux

selinux

SELinux  – Security-Enhanced Linux Linux is regarded as one of the most secure operating systems you can use today, that is because of its illustrious security implementation features. For starters, SELinux is described as a mandatory access control (MAC) security structure executed in the kernel. SELinux offers a means of enforcing some security policies which would otherwise not … Read more

MySQL : Introduction to MySQL

MySQL Cluster

Birth Of MySQL MySQL started out with the intention of using the mSQL database system to connect to tables using fast low-level (ISAM) routines. However, after some testing, They conclude that mSQL was not fast enough or flexible enough. This resulted in a new SQL interface to our database but with almost the same API interface … Read more