İsmail Baydan – Page 106 – POFTUT

Author: İsmail Baydan


User Groups in Linux

I have heard that Linux have groups. I wonder that how can use groups in Linux ? Linux user groups are used to groups users so for privilege and permission issues can be solved for multiple users easily. For example if we have a file and want to read access for 47 Linux users we can use groups mechanism to group these users and give access to the newly created...


How To Shutdown Linux System?

I am new to Linux and I have installed some Linux distributions. I try to learn bash commands. I can shutdown my computer from Desktop manager easily. But How can I shutdown system from bash without a GUI. There are different ways to shutdown Linux system. Following commands will work most of the distributions like Ubuntu, Debian, Mint, Kali, CentOS, RedHat, Fedora. Poweroff Command We can shutdown a Linux system...


Install Dnsmasq As Cache Dns Server

We have a lot of computer in our network. Our network speed is not too much. Sometimes especially in mornings our internet connection slows down. How can solve this with some dns related tricks? Dns is one of the mostly used network protocol. It can effect the internet speed. Making some optimizations will develop your internet experience. Caching is to hold resolved dns queries in our dns server. There are...


Bash Infinite Loop Shell Linux

How can write infinite shell that will run forever? May be I need a 5 second sleep between steps. Recently I have a issue with my routing table and I need to remove some route automatically every 5 minutes. I came up with a solution that runs every 4 minutes and clears unwanted routes. While Infinite Loop There are a lot of different ways do express our solution one of...


How To Check Whether A File Exists Using Python?

Python programming language provides different ways to check file existence. In this tutorial we will examine functions like isFile() and exists() to check file existence. Import os.path Module In order to use isFile() and exists() functions we need to import the os.path module which contains these functions.

isFile() Method isfile() is a function in os.path library. This function will be return true if the file is regular file and exists. As we can see...


How To Find Python Version?

I want to run some python scripts but want to learn version of the python installed on the system. How can I do that? This works almost all operating systems from Windows to Linux, from Mac OS to Bsd. Get Version Of Default Python Interpreter We can get default python interpreter version like below. As we know that if the version of python is not specified the default python interpreter...


How To Start, Stop, Restart Networking On Linux?

I have changed my network configuration and want to restart to make changes effective. Or there are some problems with my network and I think restarting it will solve my problems. Here we will look how to restart networking service in various network distributions like Ubuntu, Debian, Fedora,CentOS. Get Status Of Network Service We will get status of network with the following command. Debian, Ubuntu, Kali For deb based distributions...


Linux Cp or Copy Command

Linux popular command cp is used to copy files and folders. In this tutorial we will look different usage types of cp command. Syntax Syntax of cp command is like below.

Copy We will just copy our source file to the destination file.


How To Check If String Contains A Specific Word in PHP?

I have a string and want to check if the string provides some word I want to look. For example the string is like below

There are different way to archive this we will look them below. By Using strpos() Function strpos is a Php function used to find given word position in a string. If the word exist strpos will return the the start position of the word in...


How To Prevent SQL Injection in Php Applications?

I have an application and I have complex requests tot the server. There are a lot of database operations. Managing them can become very hard some times. In this situation how can I prevent sql injection attacks to my application. Use Prepared Statements Prepared statements are the way to bind client side provided values with database queries. Prepared Data Object (PDO) acts middle proxy and prevents sql injections. PDO is...

Enjoy this blog? Please spread the word :)