def unit_size(size):
    """ Convert Byte size to KB/MB/GB/TB.
    """
    units = ['KB', 'MB', 'GB', 'TB']
    i = 0
    size = size / 1024
    while size >= 1024 and i<(len(units)-1):
        i = i + 1
        size = size / 1024
    return '%.2f %s'%(size, units[i])