Scripts Unix

How To Permanently Change The Linux IP Address Manually?

Posted by Jay     Tags: , , 10 January, 2010    1,402 views    (0) Comment

You need to know what are the related or affected files for each change.These are the files related to change the ip and hostnames. 1. Setting the IP /etc/sysconfig/network-scripts/ifcfg-eth0 2. Setting the DNS /etc/resolv.conf /etc/hosts 3. Setting the Router /etc/sysconfig/network 4. Restart the network /etc/rc.d/init.d/network restart There are two ways to change it. First method is temporary method, second method is permanent Read Full Article (Click here)...

Categories : Scripts Unix Tags : , ,

How to find large files in Linux operating system?

Posted by Jay     Tags: , 5 January, 2010    1,135 views    (3) Comment

Even though Linux OS provides GUI explorer like windows, you have search functionality in windows to find a particular files within the size range. How can we find similar search in command line linux? Here is the sample command: From root directory, Finds all files over 20,000KB (roughly 20MB) in size and presents their names and size find / -type f -size +20000k -exec ls -lh {} \; | awk ‘{ print $9 “: ” $5 }’ From current directory, Finds all files over 20,000KB Read Full Article (Click here)...

Categories : Scripts Unix Tags : ,

Bash Script: How Do I Copy The Missing Files, Directories Alone From a Directory to Another Directory in Linux?

Posted by Jay     Tags: , , , 5 September, 2009    4,574 views    (0) Comment

How Do I Copy The Missing Files, Directories Alone From a Directory to Another Directory in Linux? I tried to upgrade the wordpress version for this blog and end up with some issues with my customization, especially on a production system like this. Hence, I have to unzip the latest wordpress in a directory and copy on the extra files, directories from the old wordpress directory to the new place including wp-config.php. Doing that manually is tiresome and have the risk of missing some files Read Full Article (Click here)...

Categories : Scripts Unix, wordpress Tags : , , ,

BASH Help:How do i check if a directory exists and display that it doesn’t using bash?

Posted by Jay     Tags: , 5 September, 2009    4,982 views    (0) Comment

BASH Help:How do i check if a directory exists and display that it doesn’t using bash? I’m trying to check if the directory with the string name “$checkdirectory” exists, then display a message that it doesn’t if it doesn’t. Can someone help me with this? I’m very new to bash and was using another program as a reference/learning program but I’m not sure how I would do this. Answer: if [ -d $checkdirectory ]; then echo “Error: Read Full Article (Click here)...

Categories : Scripts Unix Tags : ,

Unix / Linux Security: Secure your box using (autoban) Denyhosts

Posted by Jiltin     Tags: 16 August, 2009    6,868 views    (0) Comment

I wrote a denyhack shell scripts to restrict the hacking users from the server. It was my development with bash script. I am using it for the past three years. Recently, While doing google search, I find an open source (source-forge) software denyhosts,written in python, which does the same function. Here are some tips to make your Linux server safer from intruders. I have recently viewed by log files in linux and noticed a few hundreds failed logins from different hosts on my sshd Read Full Article (Click here)...

Categories : Scripts Unix Tags :