apache2ctl fullstatus /usr/sbin/apache2ctl: line 119: www-browser: command not found

When I execute following command to see apache's full-status I get just an error message:

apache2ctl fullstatus 
/usr/sbin/apache2ctl: line 119: www-browser: command not found

Any idea how to monitore Apache on debian Lenny?

Thanks a lot!

Replace string in big database or large text file

You have a cms and a big database with over 100 tables and 100.000 entries. And you need to replace all entries contain "" with "". How you do that? Editing all entries manually with phpmyadmin? It could takes weeks to complete. I have found a solution and want to share with you.


1. Export your whole database in a text file : db.sql
2. Replace string using Linux sed command
3. Empty your db and import new sql file

Export your mysql database into a text file: db.sql

mysqldump -u root -p your_database_name > db.sql

Argument List too Long

If you try to remove a directory with ie 500.000 files, you will get an error like this: Argument list is too long, cannot delete.

rm -Rfv ./some-dirs-with-unwanted-files

Instead of rm use find and rm.

find ./ -exec rm -vf {} \;

Using "Linux Find" command to get human readable directory sizes in public_html

Say you have 100 top level directories and 1000 files just under ../public_html/ without counting deeper located files and dirs. and you want to get an overview of dirs under your www-directory. You can do it with one line command.

Use find to find directories, set maxdept to just get top-level folders.

Combine it with -exec and get same time the disk usage of dirs.

Use -h for human readable file sizes GB, MB, KB instead of byte size.

find /home/YOUR_USERNAME/public_html/ -type d -maxdepth 1 -exec du -sh {} \;

How to login to FTP as root with Filezilla?

I have a redhat box and want to download whole server to my pc. I want to connect to server as root with filezilla but cannot! I can do it with winscp. I want to prefer Filezilla that it is faster.

Syndicate content is a free online community for webdevelopers and beginners. Anybody can share their code, articles, tips, tutorials, code-examples or other webdesign related material on the site. Newbies can submit their questions and reply to existing questions. CW does not guarantee or warrant reliability of code, data and information published on the site. Use the site on your own risk. The site takes no responsibility of direct or indirect loss or any kind of harm to its users. The site also doesn't take responsibility of infected files or source code with any kind of infection or viruses, worms, spywares, malwares, trojan horses. CW reserves the right to edit, move, or delete any of content for any reason.