How can I check to see if DNS is working?

Dont use “ping” to test DNS. Use tools called “nslookup” and “dig”.

Check to see whether or not your registrar is pointing your domain to the correct nameservers. The “whois” information is often wrong, and should not be used. Go to a command prompt/console and enter the command:

nslookup -type=NS yourdomainname.com

If the response does not contain all of the correct name servers, then you should contact your registrar and have them fix it.

Check to see whether a particular server is responding, you can add the server name:

nslookup www.yourdomainname.com ns1.yournameserver.com

If the response has a bunch of ‘root-servers’ that means the server does not know about the domain name and is referring you elsewhere.

To look for a certain record type, like the “MX” record or the “SOA” record, you can use the parameter “-type=MX” or “-type=SOA”.

nslookup -type=MX yourdomainname.com

In order to see all TCP sockets currently open, run (as root).

# lsof -i TCP

If all of the sockets in question on your webserver port (port 80), you should be able to list only those with

# lsof -i TCP:80

lsof is another tool for locating open files. lsof (no options) will list all files opened by any processes currently running. To restrict this to processes owned by username, use

lsof -u username.

Booting into Emergency Mode

In emergency mode, you are booted into the most minimal environment possible. The root file system is mounted read-only and almost nothing is set up. The main advantage of emergency mode over single-user mode is that the init files are not loaded. If init is corrupted or not working, you can still mount file systems to recover data that could be lost during a re-installation.
To boot into emergency mode, use the same method for single-user mode,

“Booting into Single-User Mode” with one exception, replace the keyword single with the keyword emergency.

Reinstalling the Boot Loader

In many cases, the GRUB boot loader can mistakenly be deleted, corrupted, or replaced by other operating systems.
The following steps detail the process on how GRUB is reinstalled on the master boot record:

Boot the system from an installation boot medium.

Type linux rescue at the installation boot prompt to enter the rescue environment.
Type chroot /mnt/sysimage to mount the root partition.
Type /sbin/grub-install /dev/hda to reinstall the GRUB boot loader, where /dev/hda is the boot partition.

Review the /boot/grub/grub.conf file, as additional entries may be needed for GRUB to control additional operating systems.
Reboot the system.

Splitting a file in GNU/Linux

If you want to split a file “myvideo” with size 9.6 Mb( 10000000 b) into two, then the command to do the same is:

$ split -b 5000000 myvideo

File “myvideo” is now split into two files “xaa” and “xab” by default and these two files will be having the size 5000000 b. Reducing file size will lead to more number of new files generated. You can also specify the output filename. Suppose you want to use output file name as “video”, then the following command will help you:

$ split -b 5000000 example myvideo

Now how to join the splitted files? You can use the cat command to join the splitted files. For example if the new files generated by split are “xaa”, “xab” and “xac”, use the following command to join the splitted files.

$ cat xa* > filename

« Prev - Next »