Tag archive for ‘line’

How to Restrict System Access from Servers and Networks

Usually a firewall is used to protect a server from other servers and networks. However, in some cases you may also want to protect a server within a network by using a TCP Wrapper. The Xinetd super server that comes with most Linux distributions includes a built-in TCP wrapper. It can be used to explicitly [...]

DNS recursive

For who have recently notice that now DNSreport do verify if your DNS is recursive lookup or not, here is the tip on how to set it up. open you named.conf and add before options { the follow lines: acl “trusted” { xxx.xxx.xxx.xxx; yyy.yyy.yyy.yyy; }; where xxx.xxx.xxx.xxx is your ip address same for yyy.yyy.yyy.yyy. for [...]

CentOS/Fedora forgotten password

What to do if you forgot the password for your CentOS/Fedora/Redhat machine?? Here are some simple steps to change back the password by entering into single user mode of your machine provided you do not forgotten your grub password if you have set it Reboot your machine Press ‘Esc’ key once grub starts loading Select [...]

Solaris: How do I setup a default static route / static router IP address?

/etc/defaultrouter is the configuration file for default router under Solaris os. The /etc/defaultrouter file can contain the IP addresses or hostnames of one or more default routers, with each entry on its own line. If you use hostnames, each hostname must also be listed in the local /etc/hosts file, because no name services are running [...]

Get a count of files/folder in a directory

$ ls -A1 /path/to/folder | wc -l Lists out the files in a directory including hidden files in a single-column format and pipes it through a line count via wc.

How to convert files from Windows format to UNIX format

This tip shows you how to convert files from Windows format to UNIX format and vice versa. This can be handy if you’ve ever opened a file that was created in Windows and found your screen full of of ^M characters at the end of every line. Code Listing 1: Converting files with tr and [...]

Script utility to read a file line line and separate line in fields

Script utility to read a file line line version 2. This is simpler version of readline script, it also demonstrate how to process text data file line by line and then separate line in fields, so that you can process it according to your need. #!/bin/bash # # Shell script utility to read a file [...]

Proftp log file shows strange fff with IP address

I have often noticed that while running ftp server with ProFTP there are strange f’s coming with ipadress like FFFF:11.33.44.99 I got this fixed by disabling IPv6 used by Proftp. Just put this one line in your proftp configuration file /etc/proftpd.conf UseIPv6 off You can see the changes while analysing the /var/log/secure log file for [...]

Howto: change collation for mysql

People may think of changing “collation” for their Mysql databases and here how to change it. First, there are two ways to check the current collation on your server. One from the command line and one from the mysql prompt: root@server [~]# mysqladmin variables | grep collation | collation_connection | utf8_general_ci | | collation_database | [...]

vi Find And Replace Text Command

How do I find and replace (substitute) test using vi or vim text editor under UNIX / Linux / BSD or Apple OS X operating systems? Both vi and vim text editor comes with substitute command for finding and replacing text. Syntax The syntax is as follows: :%s/WORD-To-Find-HERE/Replace-Word-Here/g OR :%s/FindMe/ReplaceME/g Examples The substitute command can [...]

Enter your email address:

Liên Kết Website

web design | Shared linux windows problems | Dedicated server | website chất lượng cao | hosting chất lượng cao | Tutorial video collection | Troubleshooting Tips and Tutorial