$ cleanlinks
this is supported on few flavor of Linux (XFree86), you can use this script.
#/bin/bash
DIR="$1"
[ -d $DIR ] && [ $(ls -l $DIR | wc -l) -eq 1 ] && rmdir $DIR || :
$ script.sh dir1
Wednesday, March 19, 2008
Removing blank line from file
Using sed.
$ sed '/^$/d' withblankline.txt > withoutblankline.txt
Using grep.
$ grep -v '^$' withblankline.txt > withoutblankline.txt
Use following for loop (shell script) to remove all blank lines from all files stored in /home/prabhat/data directory:
$ sed '/^$/d' withblankline.txt > withoutblankline.txt
Using grep.
$ grep -v '^$' withblankline.txt > withoutblankline.txt
Use following for loop (shell script) to remove all blank lines from all files stored in /home/prabhat/data directory:
#!/bin/sh
files="/home/prabhat/data/*.txt"
for f in $files
do
sed '/^$/d' $i > $i.out
mv $i.out $i
done
How to check reverse DNS
The DNS is used to determine what IP address is associated with a given host name, so to reverse resolve a known IP address is to lookup what the associated host name for it. A reverse lookup is often referred to simply as reverse resolving, or more specifically reverse DNS lookups.
Use of reverse DNS.
Check reverse DNS for given IP address under Linux or Windows XP/Server 2003.
You can use standard UNIX / Linux utilities such as nslookup, dig or hosts to find out reverse DNS of a given IP address.
eg; under Linux/UNIX/
$ host 66.65.123.34
or
dig -x IP (66.65.123.34)
and under Linux/UNIX/Windows
nslookup 66.65.123.34
Use of reverse DNS.
Anti-spam
Network troubleshooting
Avoid spammers and phishers using a forward confirmed reverse DNS etc
Check reverse DNS for given IP address under Linux or Windows XP/Server 2003.
You can use standard UNIX / Linux utilities such as nslookup, dig or hosts to find out reverse DNS of a given IP address.
eg; under Linux/UNIX/
$ host 66.65.123.34
or
dig -x IP (66.65.123.34)
and under Linux/UNIX/Windows
nslookup 66.65.123.34
Subscribe to:
Posts (Atom)
SHOW ENGINE INNODB STATUS
The SHOW ENGINE INNODB STATUS command in MySQL provides detailed information about the internal state of the InnoDB storage engine. This ...
-
Change Views DEFINER without ALTER VIEW: UPDATE `mysql`.`proc` p SET definer = ‘root@localhost’ WHERE definer=’root@foobar’ AND db=’w...
-
The Unix top command is designed to help users determine which processes are running and which applications are using more memory or process...
-
MySQL's InnoDB storage engine data refresh every situation. This post from InnoDB down, look at the data from the memory to the InnoDB ...