Remove comment lines out of large config files

This example is to remove comment lines from the huge squid.conf file.

cd /etc/squid/ or cd /etc/squid3 depending the destination of your squid file.

mv squid.conf squid.conf.fullcopy
grep -v ^$ squid.conf.fullcopy |grep -v ^# > squid.conf

Was this answer helpful?

 Print this Article

Also Read

Remove .svn folders

If you have just checkout Guru-host's CMS via subversion and want to clean up .svn folders please...

Find large files

Finds all files over 200,000KB (roughly 200MB) in size and presents their names and size in a...

How to find all directories with 777 permissions

find /home -type d -perm 777 Of course you need to replace /home with the appropriate path.

Find users with php flag into htaccess

suPHP doesn't allow the use of php_flag and php_value in .htaccess files, so find users with...

Backup MySQL database

All you need is the following command:mysqldump -h localhost -u dbuser -p dbname >...