Tag: contracting


MySQL CONCAT limitation

So you're trying to concat two large strings and it keeps resulting in a truncated or empty string? The problem may be that CONCAT can only result in a string of length 1024 bytes long. Worse is there is no setting in MySQL that allows you to increat...

Don't overwrite permissions with tar file

When you use tar to back-up a directory and then you want to restore that directory you may want to keep existing permissions intact. If you made changes to the permissions since the archive was created and you want to restore the original files while ...

GB vs. GIB | 1024 vs. 1000

Looking for answers to these questions? Why are there two types of GB? Why is a KB 1024 and not 1000 bytes? Did you know there are two types of Gigabytes (GB)? What if I told you that they are not the same amount of bytes? That manufacturers list th...

Get size of database in bytes and rows

How to get the size of the database in MySQL? Replace database_name with the database name from which you want the size in bytes and rows: SELECT t.table_schema,SUM(t.table_rows) AS row_count,SUM(t.data_length) AS data_volume FROM information_schema.t...

Exclude images from a Linux find

If you want to find all files in a sub directory and you don't want images to show up in the list here is a way to do it: [local_username@localhost /]$ find /some/dir/ -type f \( -name '*.png' -o -name '*.jpg' -o -name '*.jpeg' -o -name '*.gif' \) -pr...