The present invention provides histone deacetylase inhibitors of general formula (I), a process for the preparation of such compounds and uses of the compounds in medicine, especially in the treatment of cancers and the inhibition of histone deacetylase activity.