def tail_file(path, n=1, bs=1024):
    """
    Tail the last n lines of a file at a given path

    :param path: The path to the file
    :param n: The last n number of lines
    :param bs: The block-size in bytes
    :return: A list of lines
    """
    f = open(path)
    f.seek(0, 2)
    l = 1 - f.read(1).count('\n')
    B = f.tell()
    while n >= l and B > 0:
        block = min(bs, B)
        B -= block
        f.seek(B, 0)
        l += f.read(block).count('\n')
    f.seek(B, 0)
    l = min(l, n)
    lines = f.readlines()[-l:]
    f.close()
    return lines
