http://www.hersoncruz.com

  • Increase font size
  • Default font size
  • Decrease font size

Web development

Joomla, Drupal, Compiere, TinyERP, vtigerCRM, Openbravo, GLPI, OOZ Your company must be open to the power of Internet and provide your customer and employees with tools to integrate work and communications,

#000000

Linux Servers

Samba, Bind9, DHCP, Apache, OpenSSH, Apache, OpenLDAP, Squid Free software has many users on corporate market. I provide quality solutions for all your needs in servers technology. Free software brings you

#000000

Security

Firewall, FreeBSD, Bastille, Tripwire, IPCop, Untangle, E-Box Give us the oportunity to protect your network against Internet threats with the most efficient software ever created. We implement firewalls, DMZ zones, network

#000000
http://www.hersoncruz.com/components/com_gk2_photoslide/images/thumbm/2811300001.jpg
http://www.hersoncruz.com/components/com_gk2_photoslide/images/thumbm/2332880003.jpg
http://www.hersoncruz.com/components/com_gk2_photoslide/images/thumbm/2313660002.jpg
thumbnailthumbnailthumbnail
Home Blog
Blog

Simulate load on linux serve with one-line command

Some days ago I needed a quick way to simulate load on a Linux sever. While there are many tools that can do this, all I needed was a simple bash one-line command that can make the CPUs beg for mercy.
What I ended up using is this:
dd if=/dev/zero bs=100M | gzip | gzip -d | gzip | gzip -d | gzip | gzip -d > /dev/null & 
Send a few of these to the background and you'll start seeing smoke coming from your server soon.
 

Bash sequences

A very helpful command I like to use to organize folders is:

for i in {a..z}; do mkdir $i; done

This creates a folder for each letter from "a" to "z".

 

Howto backup and restore MySQL database with character set intact

If you want to preserve characters like ñ, ó, ç, etc. when migrating a MySQL database use mysqldump to export the database with this options:

mysqldump -u root -p --default-character-set latin1 --skip-character-set <dbname> > mydump.mysql

create the target database with:

mysqladmin -u root -p create <dbname> --default-character-set latin1 --collate latin1_swedish_ci

then restore:

mysql -u root -p --default-character-set latin1 <dbname> < mydump.mysql


 



Newsflash

Free and open source software, also F/OSS, FOSS, or FLOSS (for Free/Libre/Open Source Software) is software which is liberally licensed to grant the right of users to study, change, and improve its design through the availability of its source code. This approach has gained both momentum and acceptance as the potential benefits have been increasingly recognized by both individuals and corporate players.