<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def parse_unix(self, lines):
        '''Parse listings from a Unix ls command format.'''
        # This method uses some Filezilla parsing algorithms

        for line in lines:
            original_line = line
            fields = line.split(' ')
            after_perm_index = 0

            # Search for the permissions field by checking the file type
            for field in fields:
                after_perm_index += len(field)
                if not field:
                    continue

                # If the filesystem goes corrupt, it may show ? instead
                # but I don't really care in that situation.
                if field[0] in 'bcdlps-':
                    if field[0] == 'd':
                        file_type = 'dir'
                    elif field[0] == '-':
                        file_type = 'file'
                    elif field[0] == 'l':
                        file_type = 'symlink'
                    else:
                        file_type = 'other'

                    perms = parse_unix_perm(field[1:])

                    break
            else:
                raise ListingError('Failed to parse file type.')

            line = line[after_perm_index:]

            # We look for the position of the date and use the integer
            # before it as the file size.
            # We look for the position of the time and use the text
            # after it as the filename

            while line:
                try:
                    datetime_obj, start_index, end_index = self.parse_datetime(line)
                except ValueError:
                    line = line[4:]
                else:
                    break
            else:
                raise ListingError(
                    'Could parse a date from {}'.format(repr(original_line)))

            file_size = int(line[:start_index].rstrip().rpartition(' ')[-1])

            filename = line[end_index:].strip()

            if file_type == 'symlink':
                filename, sep, symlink_dest = filename.partition(' -> ')
            else:
                symlink_dest = None

            yield FileEntry(filename, file_type, file_size, datetime_obj,
                            symlink_dest, perm=perms)