Opções de unzipsfx
UNZIPSFX.
Unzipsfx - stub auto-extraível para o anterior a arquivos ZIP.
DESCRIÇÃO.
Unzipsfx é uma versão modificada de unzip (1L) projetada para ser anexada aos arquivos ZIP existentes para formar arquivos auto-extraíveis. Em vez de levar seu primeiro argumento não-bandeira a ser o arquivo zip a ser extraído, o unzipsfx se busca sob o nome pelo qual foi invocado e testou ou extrai o conteúdo do arquivo anexado. Como o talão executável adiciona volume para o arquivo (o propósito total é ser tão pequeno quanto possível), uma série de recursos menos vitais no descompactador normal foram removidos. Entre estas estão a tela de uso (ou ajuda), as funções de listagem e diagnóstico (-l e - v), a capacidade de descomprimir os formatos de compressão mais antigos (os métodos "reduzir", "encolher" e "implodir"). A capacidade de extrair para um diretório diferente da atual pode ser selecionada como uma opção de tempo de compilação, que agora está habilitada por padrão desde a UnZipSFX versão 5.5. Da mesma forma, o desencripto é suportado como uma opção de tempo de compilação, mas deve ser evitado, a menos que o arquivo anexado contenha arquivos criptografados. Começando com a versão 5.5, outra opção de tempo de compilação adiciona um recurso "executar comando após extração". Esse recurso atualmente é incompatível com o recurso "extrair para diretório diferente" e permanece desativado por padrão.
Note-se que os arquivos auto-extraíveis feitos com o unzipsfx não são mais (ou menos) portáteis em diferentes sistemas operacionais do que o próprio executável de descompactar. Em geral, um arquivo auto-extraível feito em um sistema particular do Unix, por exemplo, só se auto extrai com o mesmo sabor do Unix. O Unzip regular ainda pode ser usado para extrair o arquivo incorporado como com qualquer arquivo zip normal, embora ele gere um aviso inofensivo sobre bytes extras no início do arquivo zip. Apesar disso, no entanto, o arquivo auto-extraível não é tecnicamente um arquivo ZIP válido, e PKUNZIP pode não conseguir testá-lo ou extraí-lo. Essa limitação deve-se à maneira simplista em que o arquivo é criado; a estrutura do diretório interno não é atualizada para refletir os bytes extras antes do arquivo zip original.
Uma lista opcional de membros do arquivo a serem processados. Expressões regulares (curingas) semelhantes às de Unix egrep (1) podem ser usadas para combinar vários membros. Esses curingas podem conter:
corresponde a uma sequência de 0 ou mais caracteres.
corresponde exatamente a 1 personagem.
corresponde a qualquer caractere encontrado dentro dos suportes; os intervalos são especificados por um caractere inicial, um hífen e um caractere final. Se um ponto de exclamação ou um cursor ('!' Ou '^') segue o suporte esquerdo, então o intervalo de caracteres entre os colchetes é complementado (ou seja, qualquer coisa exceto os caracteres dentro dos colchetes é considerada uma partida).
(Certifique-se de citar qualquer caractere que de outra forma possa ser interpretado ou modificado pelo sistema operacional, particularmente em Unix e VMS.)
Uma lista opcional de membros do arquivo a serem excluídos do processamento. Uma vez que os caracteres curinga combinam separadores de diretório ('/'), esta opção pode ser usada para excluir todos os arquivos que estão em subdiretórios. Por exemplo, "foosfx *. [Ch] - x * / *" extrairia todos os arquivos de origem C no diretório principal, mas nenhum em nenhum subdiretório. Sem a opção - x, todos os arquivos de origem C em todos os diretórios dentro do arquivo zip serão extraídos.
Se unzipsfx for compilado com SFX_EXDIR definido, a seguinte opção também está ativada:
Um diretório opcional para o qual extrair arquivos. Por padrão, todos os arquivos e subdiretórios são recriados no diretório atual; A opção - d permite a extração em um diretório arbitrário (sempre assumindo que alguém tenha permissão para gravar no diretório). A opção e o diretório podem ser concatenados sem espaço em branco entre eles, mas note que isso pode fazer com que o comportamento normal do shell seja suprimido. Em particular, "-d.
Unzipsfx suporta as seguintes opções de descompressão (1L): - c e - p (extrair para saída / tela padrão), - f e - u (refrescar e atualizar arquivos existentes após a extração), - t (arquivo de teste) e - z (imprimir comentário de arquivo). Todas as opções normais de listagem (-l, - v e - Z) foram removidas, mas a opção de teste (-t) pode ser usada como uma listagem de "homem pobre". Alternativamente, aqueles que criam arquivos de extração automática podem desejar incluir uma listagem curta no comentário do arquivo zip.
Veja descompactar (1L) para obter uma descrição mais completa dessas opções.
o unzipsfx atualmente suporta todos os modificadores de descompactar (1L): - a (converter arquivos de texto), - n (nunca sobrescrever), - o (substituir sem aviso), - q (operar silenciosamente), - C (nomes de correspondência caso-insensivelmente) - L (converter nomes de SO maiúsculas para minúsculas), - j (caminhos de lixo) e - V (reter números de versão); mais as seguintes opções específicas do sistema operacional: - X (restaurar o proprietário do VMS / informações de proteção), - s (converter espaços em nomes de arquivos para sublinhados [DOS, OS / 2, NT]) e - $ (etiqueta de volume de restauração [DOS, SO / 2, NT, Amiga]).
(O suporte para a conversão de texto ASCII regular pode ser removido em versões futuras, uma vez que é simples o suficiente para o criador do arquivo garantir que os arquivos de texto tenham o formato apropriado para o sistema operacional local. A conversão do EBCDIC continuará, evidentemente, sendo suportada desde o arquivo zip O formato implica o armazenamento ASCII de arquivos de texto.)
Veja descompactar (1L) para obter uma descrição mais completa desses modificadores.
OPÇÕES AMBIENTAIS.
Unzipsfx usa as mesmas variáveis de ambiente que o Unzip (1L), embora isso seja provavelmente um problema apenas para a pessoa que cria e teste o arquivo de extração automática. Veja descompactar (1L) para obter detalhes.
DECRIÇÃO.
O decodificação é suportado exatamente como no descompactar (1L); isto é, de forma interativa com um prompt que não faz eco para a (s) senha (s). Veja descompactar (1L) para obter detalhes. Mais uma vez, note que, se o arquivo não tiver arquivos criptografados, não há motivo para usar uma versão do unzipsfx com suporte de descriptografia; Isso só aumenta o tamanho do arquivo.
AUTORUN COMMAND.
Quando unzipsfx foi compilado com CHEAP_SFX_AUTORUN definido, um recurso simples de "comando de execução automática" é suportado. Você pode inserir um comando no comentário do arquivo Zip, usando o seguinte formato:
Quando unzipsfx reconhece o "$ AUTORUN $ & gt;" token no início do comentário do arquivo Zip, o restante da primeira linha do comentário (até o primeiro caractere da nova linha) é passado como um comando de shell para o sistema operacional usando a função "sistema" do C rtl. Antes de executar o comando, o unzipsfx exibe o comando no console e solicita ao usuário a confirmação. Quando o usuário desligou a solicitação, especificando a opção - q, os comandos de execução automática nunca serão executados.
Caso o comentário de arquivo contenha linhas de texto adicionais, o restante do comentário de arquivo após a primeira linha é exibido normalmente, a menos que uma operação silenciosa seja solicitada fornecendo uma opção - q.
Para criar letras de arquivo auto-extraíveis a partir de um arquivo zip. zip regular e alterar as permissões do novo arquivo para serem executáveis no mundo em Unix:
Para criar o mesmo arquivo em MS-DOS, OS / 2 ou NT (observe o uso da opção / b [binário] para o comando copiar):
(O comando de adição do VMS também pode ser usado. O segundo comando instala o novo programa como um "comando estrangeiro" capaz de tomar argumentos. A terceira linha assume que o Zip já está instalado como um comando externo.) Em AmigaDOS:
(O MakeSFX está incluído na distribuição de origem do UnZip e com as distribuições binárias da Amiga. "Zip-A" não funciona nos arquivos Amiga de extração automática.) Para testar (ou listar) o recém-criado arquivo auto-extraível:
Para testar as letras silenciosamente, imprime apenas uma mensagem de resumo indicando se o arquivo está correto ou não:
Para extrair o conteúdo completo no diretório atual, recriando todos os arquivos e subdiretórios conforme necessário:
Para extrair todos os arquivos *.txt (no Unix, cite o '*'):
Para extrair tudo exceto os arquivos *.txt:
Para extrair apenas o arquivo README para a saída padrão (a tela):
Para imprimir apenas o comentário do arquivo zip:
LIMITAÇÕES.
O princípio e a limitação fundamental do unzipsfx é que ele não é portátil em arquiteturas ou sistemas operacionais e, portanto, também não são os arquivos resultantes. Para algumas arquiteturas, há portabilidade limitada, no entanto (por exemplo, entre alguns sabores do Unix com base em Intel).
Outro problema com a implementação atual é que qualquer arquivo com "lixo" previamente ao princípio tecnicamente não é mais um arquivo zip (a menos que o zip (1) seja usado para ajustar os deslocamentos do arquivo zip apropriadamente, conforme mencionado acima). Unzip (1) toma nota dos bytes prependidos e os ignora, uma vez que alguns protocolos de transferência de arquivos, notadamente MacBinary, também são conhecidos por prepend junk. Mas o conjunto de arquivadores do PKWARE pode não conseguir lidar com o arquivo modificado, a menos que suas compensações tenham sido ajustadas.
Unzipsfx não tem conhecimento do PATH do usuário, então, em geral, um arquivo deve estar no diretório atual quando ele é invocado, ou então um caminho completo ou relativo deve ser fornecido. Se um usuário tentar extrair o arquivo de um diretório no PATH além do atual, o unzipsfx imprimirá um aviso para o efeito, "não consigo encontrar-me". Isso sempre é verdade em Unix e pode ser verdade em alguns casos em MS-DOS, dependendo do compilador usado (Microsoft C qualifica completamente o nome do programa, mas outros compiladores podem não). No OS / 2 e NT há chamadas do sistema operacional disponíveis que fornecem o nome do caminho completo, para que o arquivo possa ser invocado de qualquer lugar no caminho do usuário. A situação não é conhecida por AmigaDOS, Atari TOS, MacOS, etc.
Conforme mencionado acima, uma série de funções de descompactação normal (1L) foram removidas para tornar o unzipsfx menor: uso e informações de diagnóstico, listas de funções e extração para outros diretórios. Além disso, apenas os arquivos armazenados e desinflados são suportados. A última limitação é principalmente relevante para aqueles que criam arquivos SFX, no entanto.
Os usuários do VMS devem saber como configurar arquivos auto-extraíveis como comandos estrangeiros para usar qualquer uma das opções do Unzipsfx. Isso não é necessário para uma extração simples, mas o comando para fazer isso se torna, por exemplo, "executar letras" (para continuar os exemplos dados acima).
Unzipsfx no Amiga requer o uso de um programa especial, MakeSFX, para criar arquivos de auto-extração que trabalham; A concatenação simples não funciona. (Para usuários orientados tecnicamente, o arquivo anexado é definido como um "debug hunk".) Podem existir problemas de compatibilidade entre os níveis ROM dos Amigas mais antigos e os mais recentes.
Todos os erros atuais no descompactar (1L) também existem no Unzipsfx.
DIAGNÓSTICO.
O status de saída do unzipsfx (nível de erro) é idêntico ao de descompactar (1L); veja a página do manual correspondente.
A página inicial Info-ZIP está atualmente em.
e o site ftp em.
Greg Roelofs foi responsável pelas modificações básicas do UnZip necessárias para criar o UnZipSFX. Veja descompactar (1L) para a lista atual de autores de Zip-Bugs, ou o arquivo CONTRIBE na distribuição de origem do UnZip para a lista completa de colaboradores do Info-ZIP.
Unzipsfx.
Adicione um exemplo, um script, um truque e dicas.
Para criar letras de arquivo auto-extraíveis a partir de um arquivo zip. zip regular e alterar as novas permissões do arquivo e rsquo; para ser executável no mundo em Unix:
Para criar o mesmo arquivo em MS-DOS, OS / 2 ou NT (observe o uso da opção / b [binário] para o comando copiar):
(O comando de adição do VMS também pode ser usado. O segundo comando instala o novo programa como um comando estrangeiro & rsquo; & rsquo; comando estrangeiro & rsquo; & rsquo; capaz de tomar argumentos. A terceira linha assume que o Zip já está instalado como um comando externo.) Em AmigaDOS :
(O MakeSFX está incluído na distribuição de origem do UnZip e com as distribuições binárias da Amiga. & Rsquo; & rsquo; zip - A & rsquo; & rsquo; doesn & rsquo; t trabalham nos arquivos de auto-extração Amiga.) Para testar (ou listar) o recém-criado auto-extraível arquivo:
Para testar as letras silenciosamente, imprime apenas uma mensagem de resumo indicando se o arquivo está correto ou não:
Para extrair o conteúdo completo no diretório atual, recriando todos os arquivos e subdiretórios conforme necessário:
Para extrair todos os arquivos *.txt (no Unix, cite o & rsquo; * & rsquo;):
Para extrair tudo exceto os arquivos *.txt:
Para extrair apenas o arquivo README para a saída padrão (a tela):
Para imprimir apenas o comentário do arquivo zip:
descrição.
Unzipsfx é uma versão modificada de unzip (1) projetada para ser anexada aos arquivos ZIP existentes para formar arquivos auto-extraíveis. Em vez de levar seu primeiro argumento não-bandeira a ser o arquivo zip a ser extraído, o unzipsfx se busca sob o nome pelo qual foi invocado e testou ou extrai o conteúdo do arquivo anexado. Como o talão executável adiciona volume para o arquivo (o propósito total é ser tão pequeno quanto possível), uma série de recursos menos vitais no descompactador normal foram removidos. Entre estes, estão a tela de uso (ou ajuda), as funções de listagem e diagnóstico (-l e - v), a capacidade de descomprimir os formatos de compressão mais antigos (a redução & rsquo; ; e & rsquo; & rsquo; implodir & rsquo; & rsquo; métodos). A capacidade de extrair para um diretório diferente da atual pode ser selecionada como uma opção de tempo de compilação, que agora está habilitada por padrão desde a UnZipSFX versão 5.5. Da mesma forma, o desencripto é suportado como uma opção de tempo de compilação, mas deve ser evitado, a menos que o arquivo anexado contenha arquivos criptografados. Começando com a versão 5.5, outra opção de tempo de compilação adiciona um comando de comando simples & rsquo; depois da extração & rsquo; & rsquo; característica. Este recurso é incompatível com o & rsquo; & rsquo; extrair para o diretório diferente & rsquo; & rsquo; caractere e permanece desativado por padrão.
Note-se que os arquivos auto-extraíveis feitos com o unzipsfx não são mais (ou menos) portáteis em diferentes sistemas operacionais do que o próprio executável de descompactar. Em geral, um arquivo auto-extraível feito em um sistema particular do Unix, por exemplo, só se auto extrai com o mesmo sabor do Unix. O Unzip regular ainda pode ser usado para extrair o arquivo incorporado como com qualquer arquivo zip normal, embora ele gere um aviso inofensivo sobre bytes extras no início do arquivo zip. Apesar disso, no entanto, o arquivo auto-extraível não é tecnicamente um arquivo ZIP válido, e PKUNZIP pode não conseguir testá-lo ou extraí-lo. Essa limitação deve-se à maneira simplista em que o arquivo é criado; a estrutura do diretório interno não é atualizada para refletir os bytes extras antes do arquivo zip original.
Unzipsfx suporta as seguintes opções de descompactar (1): - c e - p (extrair para saída / tela padrão), - f e - u (refrescar e atualizar arquivos existentes após a extração), - t (arquivo de teste) e - z (imprimir comentário de arquivo). Todas as opções normais de listagem (-l, - v e - Z) foram removidas, mas a opção de teste (-t) pode ser usada como um & rsquo; & rsquo; poor man & rsquo; s & rsquo; & rsquo; listagem. Alternativamente, aqueles que criam arquivos de extração automática podem desejar incluir uma listagem curta no comentário do arquivo zip.
Veja descompacte (1) para obter uma descrição mais completa dessas opções.
Uma lista opcional de membros do arquivo a serem processados. Expressões regulares (curingas) semelhantes às de Unix egrep (1) podem ser usadas para combinar vários membros. Esses curingas podem conter:
corresponde a uma sequência de 0 ou mais caracteres.
corresponde exatamente a 1 personagem.
corresponde a qualquer caractere encontrado dentro dos suportes; os intervalos são especificados por um caractere inicial, um hífen e um caractere final. Se um ponto de exclamação ou um cursor (& rsquo;! & Rsquo; ou & rsquo; ^ & rsquo;) segue o suporte esquerdo, então o intervalo de caracteres entre os colchetes é complementado (ou seja, qualquer coisa exceto os caracteres dentro dos suportes é considerado uma partida ).
(Certifique-se de citar qualquer caractere que de outra forma possa ser interpretado ou modificado pelo sistema operacional, particularmente em Unix e VMS.)
Uma lista opcional de membros do arquivo a serem excluídos do processamento. Uma vez que os caracteres curinga correspondem aos separadores de diretório (& rsquo; / & rsquo;), esta opção pode ser usada para excluir quaisquer arquivos que estejam nos subdiretórios. Por exemplo, & rsquo; & rsquo; foosfx *. [ch] - x * / * & rsquo; & rsquo; extraia todos os arquivos de origem C no diretório principal, mas nenhum em nenhum subdiretório. Sem a opção - x, todos os arquivos de origem C em todos os diretórios dentro do arquivo zip serão extraídos.
Se unzipsfx for compilado com SFX_EXDIR definido, a seguinte opção também está ativada:
Um diretório opcional para o qual extrair arquivos. Por padrão, todos os arquivos e subdiretórios são recriados no diretório atual; A opção - d permite a extração em um diretório arbitrário (sempre assumindo que alguém tenha permissão para gravar no diretório). A opção e o diretório podem ser concatenados sem espaço em branco entre eles, mas note que isso pode fazer com que o comportamento normal do shell seja suprimido. Em particular, & rsquo; & rsquo; - d.
comando de execução automática.
Quando unzipsfx foi compilado com CHEAP_SFX_AUTORUN definido, um simples & rsquo; & rsquo; comando autorun & rsquo; & rsquo; O recurso é suportado. Você pode inserir um comando no comentário do arquivo Zip, usando o seguinte formato:
Quando unzipsfx reconhece o & rsquo; & rsquo; $ AUTORUN $ & gt; & rsquo; & rsquo; token no início do comentário do arquivo Zip, o restante da primeira linha do comentário (até o primeiro caractere da nova linha) é passado como um comando shell para o sistema operacional usando o sistema & rsquo; rsquo; rsquo; função. Antes de executar o comando, o unzipsfx exibe o comando no console e solicita ao usuário a confirmação. Quando o usuário desligou a solicitação, especificando a opção - q, os comandos de execução automática nunca serão executados.
Caso o comentário de arquivo contenha linhas de texto adicionais, o restante do comentário de arquivo após a primeira linha é exibido normalmente, a menos que uma operação silenciosa seja solicitada fornecendo uma opção - q.
decodificação.
O decodificação é suportado exatamente como no descompactar (1); isto é, de forma interativa com um prompt que não faz eco para a (s) senha (s). Veja descompacte (1) para obter detalhes. Mais uma vez, note que, se o arquivo não tiver arquivos criptografados, não há motivo para usar uma versão do unzipsfx com suporte de descriptografia; Isso só aumenta o tamanho do arquivo.
diagnósticos.
O status de saída do unzipsfx & rsquo; (nível de erro) é idêntico ao de descompactar (1); veja a página do manual correspondente.
opções de ambiente.
Unzipsfx usa as mesmas variáveis de ambiente que o unzip (1), embora isso seja provavelmente um problema apenas para a pessoa que cria e teste o arquivo de extração automática. Veja descompacte (1) para obter detalhes.
limitações.
O princípio e a limitação fundamental do unzipsfx é que ele não é portátil em arquiteturas ou sistemas operacionais e, portanto, também não são os arquivos resultantes. Para algumas arquiteturas, há portabilidade limitada, no entanto (por exemplo, entre alguns sabores do Unix com base em Intel).
Outro problema com a implementação atual é que qualquer arquivo com & rsquo; & rsquo; junk & rsquo; & rsquo; Antes do início tecnicamente, não é mais um arquivo zip (a menos que o zip (1) seja usado para ajustar os deslocamentos do arquivo zip apropriadamente, conforme mencionado acima). Unzip (1) toma nota dos bytes prependidos e os ignora, uma vez que alguns protocolos de transferência de arquivos, notadamente MacBinary, também são conhecidos por prepend junk. Mas o conjunto de arquivadores do PKWARE® pode não ser capaz de lidar com o arquivo modificado, a menos que suas compensações tenham sido ajustadas.
Unzipsfx não tem conhecimento do PATH do usuário, então, em geral, um arquivo deve estar no diretório atual quando é invocado, ou então um caminho completo ou relativo deve ser fornecido. Se um usuário tentar extrair o arquivo de um diretório no PATH além do atual, o unzipsfx imprimirá um aviso para o efeito, & rsquo; & rsquo; can & rsquo; t encontrar-me. & Rsquo; & rsquo; Isso sempre é verdade em Unix e pode ser verdade em alguns casos em MS-DOS, dependendo do compilador usado (Microsoft C qualifica completamente o nome do programa, mas outros compiladores podem não). No OS / 2 e no NT existem chamadas do sistema operacional disponíveis que fornecem o nome do caminho completo, para que o arquivo possa ser invocado de qualquer lugar no caminho do usuário & rsquo; s. A situação não é conhecida por AmigaDOS, Atari TOS, MacOS, etc.
Conforme mencionado acima, uma série de funções de descompactação normal (1) foram removidas para tornar o unzipsfx menor: uso e informações de diagnóstico, listas de funções e extração para outros diretórios. Além disso, apenas os arquivos armazenados e desinflados são suportados. A última limitação é principalmente relevante para aqueles que criam arquivos SFX, no entanto.
Os usuários de VMS devem saber como configurar arquivos autoextraíbles como comandos estrangeiros para usar qualquer uma das opções do unzipsfx & rsquo; s. Isso não é necessário para uma extração simples, mas o comando para fazê-lo torna-se, por exemplo, & rsquo; & rsquo; execute letras & rsquo; & rsquo; (para continuar os exemplos dados acima).
Unzipsfx no Amiga requer o uso de um programa especial, MakeSFX, para criar arquivos de auto-extração que trabalham; A concatenação simples não funciona. (Para usuários orientados tecnicamente, o arquivo anexado é definido como um & rsquo; & rsquo; debug hunk. & Rsquo; & rsquo;). Pode haver problemas de compatibilidade entre os níveis de ROM de Amigas anteriores e os mais recentes.
Todos os erros atuais no descompactar (1) também existem no Unzipsfx.
Unzipsfx atualmente suporta todos os modificadores unzip (1): - a (converter arquivos de texto), - n (nunca sobrescrever), - o (substituir sem aviso), - q (operar silenciosamente), - C (nomes de correspondência caso-insensivelmente), - L (converter nomes de SO maiúsculas para minúsculas), - j (caminhos de lixo) e - V (reter números de versão); mais as seguintes opções específicas do sistema operacional: - X (restaurar o proprietário do VMS / informações de proteção), - s (converter espaços em nomes de arquivos para sublinhados [DOS, OS / 2, NT]) e - $ (etiqueta de volume de restauração [DOS, SO / 2, NT, Amiga]).
(O suporte para a conversão de texto ASCII regular pode ser removido em versões futuras, uma vez que é simples o suficiente para o criador do arquivo e para garantir que os arquivos de texto tenham o formato apropriado para o sistema operacional local. A conversão EBCDIC, obviamente, continuará sendo suportada O formato zipfile implica o armazenamento ASCII de arquivos de texto.)
Veja descompacte (1) para obter uma descrição mais completa desses modificadores.
A página inicial Info-ZIP está atualmente em.
Greg Roelofs foi responsável pelas modificações básicas do UnZip necessárias para criar o UnZipSFX. Consulte descompactação (1) para a lista atual de autores de Zip-Bugs, ou o arquivo CONTRIBE na distribuição de origem do UnZip para a lista completa de colaboradores do Info-ZIP.
Como este site pode ser mais útil para você?
Pode não lembrar um comando? Você está procurando como usar um comando? Este site é feito para você!
endereço extractejano: sua faca suiça do exército para extração de endereço de e-mail.
getthisjobfast: Obter um novo trabalho rápido: milhares de truques kick-ass para ajudá-lo em seu site de pesquisa de trabalho por C & eacute; dric P. (LeBerger). direitos autorais e cópias; 2018 - 2018. Todos os direitos reservados.
Adoro ? Odeio ? Diz !!
Um problema ? Uma idéia para um novo recurso? Um conselho ? Falta um comando?
DESCOMPACTAR.
descompacte - liste, teste e extraie arquivos compactados em um arquivo ZIP.
DESCRIÇÃO.
Unzip listará, testará ou extrairá arquivos de um arquivo ZIP, comumente encontrado em sistemas MS-DOS. O comportamento padrão (sem opções) é extrair para o diretório atual (e subdiretórios abaixo) todos os arquivos do arquivo ZIP especificado. Um programa complementar, zip (1L), cria arquivos ZIP; Ambos os programas são compatíveis com arquivos criados pelo PKZIP e PKUNZIP do PKWARE para MS-DOS, mas em muitos casos, as opções do programa ou comportamentos padrão diferem.
Caminho do arquivo ZIP (s). Se a especificação do arquivo for um curinga, cada arquivo correspondente será processado em uma ordem determinada pelo sistema operacional (ou sistema de arquivos). Somente o nome do arquivo pode ser um curinga; o caminho em si não pode. As expressões curingas são semelhantes às suportadas em shells Unix comumente usados (sh, ksh, csh) e podem conter:
corresponde a uma sequência de 0 ou mais caracteres.
corresponde exatamente a 1 personagem.
corresponde a qualquer caractere encontrado dentro dos suportes; os intervalos são especificados por um caractere inicial, um hífen e um caractere final. Se um ponto de exclamação ou um cursor ('!' Ou '^') segue o suporte esquerdo, então o intervalo de caracteres entre os colchetes é complementado (ou seja, qualquer coisa exceto os caracteres dentro dos colchetes é considerada uma partida). Para especificar um suporte esquerdo integral, a seqüência de três caracteres '' [[] '' deve ser usada.
(Certifique-se de citar qualquer caractere que de outra forma possa ser interpretado ou modificado pelo sistema operacional, particularmente em Unix e VMS.) Se nenhuma correspondência for encontrada, a especificação é assumida como um nome de arquivo literal; e se isso também falhar, o sufixo. zip é anexado. Note que os arquivos ZIP auto-extraíveis são suportados, como com qualquer outro arquivo ZIP; basta especificar o sufixo. exe (se houver) explicitamente.
Uma lista opcional de membros de arquivo a serem processados, separados por espaços. (As versões do VMS compiladas com VMSCLI definidas devem delimitar arquivos com vírgulas em vez disso. Consulte - v em OPTIONS abaixo.) Expressões regulares (curingas) podem ser usadas para combinar vários membros; Veja acima. Novamente, não se esqueça de citar expressões que de outra forma seriam expandidas ou modificadas pelo sistema operacional.
Uma lista opcional de membros do arquivo a serem excluídos do processamento. Uma vez que os caracteres curinga normalmente correspondem ('/') separadores de diretório (para exceções, veja a opção - W), esta opção pode ser usada para excluir quaisquer arquivos que estejam nos subdiretórios. Por exemplo, '' unzip foo *. [Ch] - x * / * '' extrairia todos os arquivos de origem C no diretório principal, mas nenhum em nenhum subdiretório. Sem a opção - x, todos os arquivos de origem C em todos os diretórios dentro do arquivo zip serão extraídos.
Um diretório opcional para o qual extrair arquivos. Por padrão, todos os arquivos e subdiretórios são recriados no diretório atual; A opção - d permite a extração em um diretório arbitrário (sempre assumindo que alguém tenha permissão para gravar no diretório). Esta opção não precisa aparecer no final da linha de comando; também é aceito antes da especificação do arquivo zip (com as opções normais), imediatamente após a especificação do arquivo zip, ou entre o (s) arquivo (s) e a opção - x. A opção e o diretório podem ser concatenados sem espaço em branco entre eles, mas note que isso pode fazer com que o comportamento normal do shell seja suprimido. Em particular, '' - d.
Observe que, para suportar hardware obsolescente, a tela de uso do descompactador é limitada a 22 ou 23 linhas e, portanto, deve ser considerada apenas uma lembrança da sintaxe básica de descompactação, em vez de uma lista exaustiva de todas as bandeiras possíveis. A lista exaustiva segue:
Modo zipinfo (1L). Se a primeira opção na linha de comando for - Z, as opções restantes serão escolhidas para opções de zipinfo (1L). Consulte a página de manual apropriada para obter uma descrição dessas opções.
[OS / 2, Unix DLL] imprimem ajuda estendida para a interface de programação da DLL (API).
extraia arquivos para stdout / screen ('' CRT ''). Esta opção é semelhante à opção - p, exceto que o nome de cada arquivo é impresso quando extraído, a opção - a é permitida e a conversão ASCII-EBCDIC é executada automaticamente, se apropriado. Esta opção não está listada na tela de uso do descompactar.
refrescar arquivos existentes, ou seja, extrair apenas os arquivos que já existem no disco e que são mais recentes do que as cópias do disco. Por padrão, descompacte consultas antes de substituir, mas a opção - o pode ser usada para suprimir as consultas. Observe que, em muitos sistemas operacionais, a variável de ambiente TZ (fuso horário) deve ser configurada corretamente para que - f e - u funcionem corretamente (em Unix, a variável geralmente é configurada automaticamente). Os motivos para isso são um pouco sutis, mas têm que ver com as diferenças entre os tempos do arquivo em formato DOS (sempre tempo local) e os tempos do formato Unix (sempre em GMT / UTC) e a necessidade de comparar os dois. Um valor TZ típico é '' PST8PDT '' (tempo do Pacífico dos EUA com ajuste automático para horário de verão ou '' horário de verão '').
arquivos de arquivo de lista (formato curto). Os nomes, os tamanhos de arquivos não compactados e as datas e horas de modificação dos arquivos especificados são impressos, juntamente com os totais para todos os arquivos especificados. Se o UnZip foi compilado com OS2_EAS definido, a opção - l também lista colunas para os tamanhos de atributos estendidos OS / 2 (EAs) armazenados e listas de controle de acesso OS / 2 (ACLs). Além disso, o comentário do arquivo zip e os comentários individuais do arquivo (se houver) são exibidos. Se um arquivo foi arquivado a partir de um sistema de arquivo de um único caso (por exemplo, o antigo sistema de arquivos FAT MS-DOS) e a opção - L foi dada, o nome do arquivo é convertido em minúsculas e é prefixado com um cursor (^).
extrair arquivos para pipe (stdout). Nada além dos dados do arquivo são enviados para stdout, e os arquivos são sempre extraídos em formato binário, assim como eles são armazenados (sem conversões).
teste arquivos de arquivo. Esta opção extrai cada arquivo especificado na memória e compara o CRC (verificação de redundância cíclica, uma soma de verificação aprimorada) do arquivo expandido com o valor CRC armazenado do arquivo original.
[a maioria dos SOs] definem o carimbo de data / hora no (s) arquivo (s) para o arquivo mais novo em cada um deles. Isso corresponde à opção do go de zip, exceto que pode ser usado em arquivos zip curinga (por exemplo, '' descompactar - T \ *. Zip '') e é muito mais rápido.
atualize arquivos existentes e crie novos, se necessário. Esta opção executa a mesma função que a opção - f, extraindo (com consulta) arquivos mais recentes do que aqueles com o mesmo nome no disco e, além disso, extrai os arquivos que ainda não existem no disco. Veja - f acima para obter informações sobre como configurar o fuso horário corretamente.
listar arquivos de arquivo (formato detalhado) ou mostrar informações de versão de diagnóstico. Esta opção evoluiu e agora se comporta como uma opção e um modificador. Como uma opção, ele tem dois propósitos: quando um arquivo zip é especificado sem outras opções, - v lista os arquivos arquivados de maneira absurda, adicionando ao básico - l informações o método de compressão, tamanho comprimido, taxa de compressão e CRC de 32 bits. Em contraste com a maioria dos utilitários concorrentes, o unzip remove os 12 bytes de cabeçalho adicionais de entradas criptografadas dos números de tamanho compactado. Portanto, os valores do tamanho comprimido e da taxa de compressão são independentes do status de criptografia da entrada e mostram o desempenho de compressão correto. (O tamanho completo do fluxo de dados comprimido criptografado para entradas do arquivo zip é relatado pelos relatórios mais detalhados do zipinfo (1L), veja o manual separado.) Quando nenhum arquivo zip é especificado (ou seja, o comando completo é simplesmente '' unzip - v ''), uma tela de diagnóstico é impressa. Além do cabeçalho normal com data e versão de lançamento, descompacte o site ftp local Info-ZIP e onde encontrar uma lista de outros sites ftp e não-ftp; o sistema operacional alvo para o qual foi compilado, bem como (possivelmente) o hardware no qual foi compilado, compilador e versão usados, e a data de compilação; quaisquer opções de compilação especiais que possam afetar a operação do programa (veja também DECRYPTION abaixo); e quaisquer opções armazenadas em variáveis de ambiente que possam fazer o mesmo (veja as OPÇÕES DE AMBIENTE abaixo). Como um modificador, ele funciona em conjunto com outras opções (por exemplo, - t) para produzir uma saída mais detalhada ou de depuração; Isso ainda não foi totalmente implementado, mas será em versões futuras.
exibir apenas o comentário do arquivo.
converter arquivos de texto. Normalmente todos os arquivos são extraídos exatamente como eles são armazenados (como arquivos '' binários ''). The - a option causes files identified by zip as text files (those with the 't' label in zipinfo listings, rather than 'b') to be automatically extracted as such, converting line endings, end-of-file characters and the character set itself as necessary. (For example, Unix files use line feeds (LFs) for end-of-line (EOL) and have no end-of-file (EOF) marker; Macintoshes use carriage returns (CRs) for EOLs; and most PC operating systems use CR+LF for EOLs and control-Z for EOF. In addition, IBM mainframes and the Michigan Terminal System use EBCDIC rather than the more common ASCII character set, and NT supports Unicode.) Note that zip 's identification of text files is by no means perfect; some ''text'' files may actually be binary and vice versa. unzip therefore prints '' [text] '' or '' [binary] '' as a visual check for each file it extracts when using the - a option. The - aa option forces all files to be extracted as text, regardless of the supposed file type. On VMS, see also - S .
[general] treat all files as binary (no text conversions). This is a shortcut for ---a .
[Tandem] force the creation files with filecode type 180 ('C') when extracting Zip entries marked as "text". (On Tandem, - a is enabled by default, see above).
[VMS] auto-convert binary files (see - a above) to fixed-length, 512-byte record format. Doubling the option ( - bb ) forces all files to be extracted in this format. When extracting to standard output ( - c or - p option in effect), the default conversion of text record delimiters is disabled for binary ( - b ) resp. all ( - bb ) files.
[when compiled with UNIXBACKUP defined] save a backup copy of each overwritten file. The backup file is gets the name of the target file with a tilde and optionally a unique sequence number (up to 5 digits) appended. The sequence number is applied whenever another file with the original name plus tilde already exists. When used together with the "overwrite all" option - o , numbered backup files are never created. In this case, all backup files are named as the original file with an appended tilde, existing backup files are deleted without notice. This feature works similarly to the default behavior of emacs (1) in many locations.
Example: the old copy of '' foo '' is renamed to '' foo.
Warning: Users should be aware that the - B option does not prevent loss of existing data under all circumstances. For example, when unzip is run in overwrite-all mode, an existing '' foo.
use case-insensitive matching for the selection of archive entries from the command-line list of extract selection patterns. unzip 's philosophy is ''you get what you ask for'' (this is also responsible for the - L / - U change; see the relevant options below). Because some file systems are fully case-sensitive (notably those under the Unix operating system) and because both ZIP archives and unzip itself are portable across platforms, unzip 's default behavior is to match both wildcard and literal filenames case-sensitively. That is, specifying '' makefile '' on the command line will only match ''makefile'' in the archive, not ''Makefile'' or ''MAKEFILE'' (and similarly for wildcard specifications). Since this does not correspond to the behavior of many other operating/file systems (for example, OS/2 HPFS, which preserves mixed case but is not sensitive to it), the - C option may be used to force all filename matches to be case-insensitive. In the example above, all three files would then match '' makefile '' (or '' make* '', or similar). The - C option affects file specs in both the normal file list and the excluded-file list (xlist).
Please note that the - C option does neither affect the search for the zipfile(s) nor the matching of archive entries to existing files on the extraction path. On a case-sensitive file system, unzip will never try to overwrite a file ''FOO'' when extracting an entry ''foo''!
skip restoration of timestamps for extracted items. Normally, unzip tries to restore all meta-information for extracted items that are supplied in the Zip archive (and do not require privileges or impose a security risk). By specifying - D , unzip is told to suppress restoration of timestamps for directories explicitly created from Zip archive entries. This option only applies to ports that support setting timestamps for directories (currently ATheOS, BeOS, MacOS, OS/2, Unix, VMS, Win32, for other unzip ports, - D has no effect). The duplicated option - DD forces suppression of timestamp restoration for all extracted entries (files and directories). This option results in setting the timestamps for all extracted entries to the current time.
On VMS, the default setting for this option is - D for consistency with the behaviour of BACKUP: file timestamps are restored, timestamps of extracted directories are left at the current time. To enable restoration of directory timestamps, the negated option --D should be specified. On VMS, the option - D disables timestamp restoration for all extracted Zip archive items. (Here, a single - D on the command line combines with the default - D to do what an explicit - DD does on other systems.)
[MacOS only] display contents of MacOS extra field during restore operation.
[Acorn only] suppress removal of NFS filetype extension from stored filenames.
[non-Acorn systems supporting long filenames with embedded commas, and only if compiled with ACORN_FTYPE_NFS defined] translate filetype information from ACORN RISC OS extra field blocks into a NFS filetype extension and append it to the names of the extracted files. (When the stored filename appears to already have an appended NFS filetype extension, it is replaced by the info from the extra field.)
[MacOS only] ignore filenames stored in MacOS extra fields. Instead, the most compatible filename stored in the generic part of the entry's header is used.
junk paths. The archive's directory structure is not recreated; all files are deposited in the extraction directory (by default, the current one).
[BeOS only] junk file attributes. The file's BeOS file attributes are not restored, just the file's data.
[MacOS only] ignore MacOS extra fields. All Macintosh specific info is skipped. Data-fork and resource-fork are restored as separate files.
[AtheOS, BeOS, Unix only] retain SUID/SGID/Tacky file attributes. Without this flag, these attribute bits are cleared for security reasons.
convert to lowercase any filename originating on an uppercase-only operating system or file system. (This was unzip 's default behavior in releases prior to 5.11; the new default behavior is identical to the old behavior with the - U option, which is now obsolete and will be removed in a future release.) Depending on the archiver, files archived under single-case file systems (VMS, old MS-DOS FAT, etc.) may be stored as all-uppercase names; this can be ugly or inconvenient when extracting to a case-preserving file system such as OS/2 HPFS or a case-sensitive one such as under Unix. By default unzip lists and extracts such filenames exactly as they're stored (excepting truncation, conversion of unsupported characters, etc.); this option causes the names of all files from certain systems to be converted to lowercase. The - LL option forces conversion of every filename to lowercase, regardless of the originating file system.
pipe all output through an internal pager similar to the Unix more (1) command. At the end of a screenful of output, unzip pauses with a ''--More--'' prompt; the next screenful may be viewed by pressing the Enter (Return) key or the space bar. unzip can be terminated by pressing the ''q'' key and, on some systems, the Enter/Return key. Unlike Unix more (1), there is no forward-searching or editing capability. Also, unzip doesn't notice if long lines wrap at the edge of the screen, effectively resulting in the printing of two or more lines and the likelihood that some text will scroll off the top of the screen before being viewed. On some systems the number of available lines on the screen is not detected, in which case unzip assumes the height is 24 lines.
never overwrite existing files. If a file already exists, skip the extraction of that file without prompting. By default unzip queries before extracting any file that already exists; the user may choose to overwrite only the current file, overwrite all files, skip extraction of the current file, skip extraction of all existing files, or rename the current file.
[Amiga] extract file comments as Amiga filenotes. File comments are created with the - c option of zip (1L), or with the - N option of the Amiga port of zip (1L), which stores filenotes as comments.
overwrite existing files without prompting. This is a dangerous option, so use it with care. (It is often used with - f , however, and is the only way to overwrite directory EAs under OS/2.)
use password to decrypt encrypted zipfile entries (if any). THIS IS INSECURE! Many multi-user operating systems provide ways for any user to see the current command line of any other user; even on stand-alone systems there is always the threat of over-the-shoulder peeking. Storing the plaintext password as part of a command line in an automated script is even worse. Whenever possible, use the non-echoing, interactive prompt to enter passwords. (And where security is truly important, use strong encryption such as Pretty Good Privacy instead of the relatively weak encryption provided by standard zipfile utilities.)
perform operations quietly ( - qq = even quieter). Ordinarily unzip prints the names of the files it's extracting or testing, the extraction methods, any file or zipfile comments that may be stored in the archive, and possibly a summary when finished with each archive. The - q [ q ] options suppress the printing of some or all of these messages.
[OS/2, NT, MS-DOS] convert spaces in filenames to underscores. Since all PC operating systems allow spaces in filenames, unzip by default extracts filenames with spaces intact (e. g., '' EA DATA. SF ''). This can be awkward, however, since MS-DOS in particular does not gracefully support spaces in filenames. Conversion of spaces to underscores can eliminate the awkwardness in some cases.
[VMS] convert text files ( - a , - aa ) into Stream_LF record format, instead of the text-file default, variable-length record format. (Stream_LF is the default record format of VMS unzip . It is applied unless conversion ( - a , - aa and/or - b , - bb ) is requested or a VMS-specific entry is processed.)
[UNICODE_SUPPORT only] modify or disable UTF-8 handling. When UNICODE_SUPPORT is available, the option - U forces unzip to escape all non-ASCII characters from UTF-8 coded filenames as ''#Uxxxx'' (for UCS-2 characters, or ''#Lxxxxxx'' for unicode codepoints needing 3 octets). This option is mainly provided for debugging purpose when the fairly new UTF-8 support is suspected to mangle up extracted filenames.
The option - UU allows to entirely disable the recognition of UTF-8 encoded filenames. The handling of filename codings within unzip falls back to the behaviour of previous versions.
[old, obsolete usage] leave filenames uppercase if created under MS-DOS, VMS, etc. See - L above.
retain (VMS) file version numbers. VMS files can be stored with a version number, in the format file. ext;## . By default the '' ;## '' version numbers are stripped, but this option allows them to be retained. (On file systems that limit filenames to particularly short lengths, the version numbers may be truncated or stripped regardless of this option.)
[only when WILD_STOP_AT_DIR compile-time option enabled] modifies the pattern matching routine so that both '?' (single-char wildcard) and '*' (multi-char wildcard) do not match the directory separator character '/'. (The two-character sequence ''**'' acts as a multi-char wildcard that includes the directory separator in its matched characters.) Examples:
This modified behaviour is equivalent to the pattern matching style used by the shells of some of UnZip's supported target OSs (one example is Acorn RISC OS). This option may not be available on systems where the Zip archive's internal directory separator character '/' is allowed as regular character in native operating system filenames. (Currently, UnZip uses the same pattern matching rules for both wildcard zipfile specifications and zip entry selection patterns in most ports. For systems allowing '/' as regular filename character, the - W option would not work as expected on a wildcard zipfile specification.)
[VMS, Unix, OS/2, NT, Tandem] restore owner/protection info (UICs and ACL entries) under VMS, or user and group info (UID/GID) under Unix, or access control lists (ACLs) under certain network-enabled versions of OS/2 (Warp Server with IBM LAN Server/Requester 3.0 to 5.0; Warp Connect with IBM Peer 1.0), or security ACLs under Windows NT. In most cases this will require special system privileges, and doubling the option ( - XX ) under NT instructs unzip to use privileges for extraction; but under Unix, for example, a user who belongs to several groups can restore files owned by any of those groups, as long as the user IDs match his or her own. Note that ordinary file attributes are always restored--this option applies only to optional, extra ownership info available on some operating systems. [NT's access control lists do not appear to be especially compatible with OS/2's, so no attempt is made at cross-platform portability of access privileges. It is not clear under what conditions this would ever be useful anyway.]
[VMS] treat archived file name endings of ''.nnn'' (where ''nnn'' is a decimal number) as if they were VMS version numbers ('';nnn''). (The default is to treat them as file types.) Example:
[MS-DOS, OS/2, NT] restore the volume label if the extraction medium is removable (e. g., a diskette). Doubling the option ( -$$ ) allows fixed media (hard disks) to be labelled as well. By default, volume labels are ignored.
[Acorn only] overrides the extension list supplied by Unzip$Ext environment variable. During extraction, filename extensions that match one of the items in this extension list are swapped in front of the base name of the extracted file.
[all but Acorn, VM/CMS, MVS, Tandem] allows to extract archive members into locations outside of the current '' extraction root folder''. For security reasons, unzip normally removes ''parent dir'' path components (''../'') from the names of extracted file. This safety feature (new for version 5.50) prevents unzip from accidentally writing files to ''sensitive'' areas outside the active extraction folder tree head. The -: option lets unzip switch back to its previous, more liberal behaviour, to allow exact extraction of (older) archives that used ''../'' components to create multiple directory trees at the level of the current extraction folder. This option does not enable writing explicitly to the root directory (''/''). To achieve this, it is necessary to set the extraction target folder to root (e. g. - d / ). However, when the -: option is specified, it is still possible to implicitly write to the root directory by specifying enough ''../'' path components within the zip archive. Use this option with extreme caution.
[Unix only] allow control characters in names of extracted ZIP archive entries. On Unix, a file name may contain any (8-bit) character code with the two exception '/' (directory delimiter) and NUL (0x00, the C string termination indicator), unless the specific file system has more restrictive conventions. Generally, this allows to embed ASCII control characters (or even sophisticated control sequences) in file names, at least on 'native' Unix file systems. However, it may be highly suspicious to make use of this Unix "feature". Embedded control characters in file names might have nasty side effects when displayed on screen by some listing code without sufficient filtering. And, for ordinary users, it may be difficult to handle such file names (e. g. when trying to specify it for open, copy, move, or delete operations). Therefore, unzip applies a filter by default that removes potentially dangerous control characters from the extracted file names. The -^ option allows to override this filter in the rare case that embedded filename control characters are to be intentionally restored.
[VMS] force unconditionally conversion of file names to ODS2-compatible names. The default is to exploit the destination file system, preserving case and extended file name characters on an ODS5 destination file system; and applying the ODS2-compatibility file name filtering on an ODS2 destination file system.
ENVIRONMENT OPTIONS.
unzip 's default behavior may be modified via options placed in an environment variable. This can be done with any option, but it is probably most useful with the - a , - L , - C , - q , - o , or - n modifiers: make unzip auto-convert text files by default, make it convert filenames from uppercase systems to lowercase, make it match names case-insensitively, make it quieter, or make it always overwrite or never overwrite files as it extracts them. For example, to make unzip act as quietly as possible, only reporting errors, one would use one of the following commands:
Unix Bourne shell:
UNZIP=-qq; export UNZIP.
setenv UNZIP - qq.
VMS (quotes for lowercase ):
define UNZIP_OPTS "-qq"
Environment options are, in effect, considered to be just like any other command-line options, except that they are effectively the first options on the command line. To override an environment option, one may use the ''minus operator'' to remove it. For instance, to override one of the quiet-flags in the example above, use the command.
The first hyphen is the normal switch character, and the second is a minus sign, acting on the q option. Thus the effect here is to cancel one quantum of quietness. To cancel both quiet flags, two (or more) minuses may be used:
(the two are equivalent). This may seem awkward or confusing, but it is reasonably intuitive: just ignore the first hyphen and go from there. It is also consistent with the behavior of Unix nice (1).
As suggested by the examples above, the default variable names are UNZIP_OPTS for VMS (where the symbol used to install unzip as a foreign command would otherwise be confused with the environment variable), and UNZIP for all other operating systems. For compatibility with zip (1L), UNZIPOPT is also accepted (don't ask). If both UNZIP and UNZIPOPT are defined, however, UNZIP takes precedence. unzip 's diagnostic option ( - v with no zipfile name) can be used to check the values of all four possible unzip and zipinfo environment variables.
The timezone variable (TZ) should be set according to the local timezone in order for the - f and - u to operate correctly. See the description of - f above for details. This variable may also be necessary to get timestamps of extracted files to be set correctly. The WIN32 (Win9x/ME/NT4/2K/XP/2K3) port of unzip gets the timezone configuration from the registry, assuming it is correctly set in the Control Panel. The TZ variable is ignored for this port.
DECRYPTION.
Encrypted archives are fully supported by Info-ZIP software, but due to United States export restrictions, de-/encryption support might be disabled in your compiled binary. However, since spring 2000, US export restrictions have been liberated, and our source archives do now include full crypt code. In case you need binary distributions with crypt support enabled, see the file ''WHERE'' in any Info-ZIP source or binary distribution for locations both inside and outside the US.
Some compiled versions of unzip may not support decryption. To check a version for crypt support, either attempt to test or extract an encrypted archive, or else check unzip 's diagnostic screen (see the - v option above) for '' [decryption] '' as one of the special compilation options.
As noted above, the - P option may be used to supply a password on the command line, but at a cost in security. The preferred decryption method is simply to extract normally; if a zipfile member is encrypted, unzip will prompt for the password without echoing what is typed. unzip continues to use the same password as long as it appears to be valid, by testing a 12-byte header on each file. The correct password will always check out against the header, but there is a 1-in-256 chance that an incorrect password will as well. (This is a security feature of the PKWARE zipfile format; it helps prevent brute-force attacks that might otherwise gain a large speed advantage by testing only the header.) In the case that an incorrect password is given but it passes the header test anyway, either an incorrect CRC will be generated for the extracted data or else unzip will fail during the extraction because the ''decrypted'' bytes do not constitute a valid compressed data stream.
If the first password fails the header check on some file, unzip will prompt for another password, and so on until all files are extracted. If a password is not known, entering a null password (that is, just a carriage return or ''Enter'') is taken as a signal to skip all further prompting. Only unencrypted files in the archive(s) will thereafter be extracted. (In fact, that's not quite true; older versions of zip (1L) and zipcloak (1L) allowed null passwords, so unzip checks each encrypted file to see if the null password works. This may result in ''false positives'' and extraction errors, as noted above.)
Archives encrypted with 8-bit passwords (for example, passwords with accented European characters) may not be portable across systems and/or other archivers. This problem stems from the use of multiple encoding methods for such characters, including Latin-1 (ISO 8859-1) and OEM code page 850. DOS PKZIP 2.04g uses the OEM code page; Windows PKZIP 2.50 uses Latin-1 (and is therefore incompatible with DOS PKZIP ); Info-ZIP uses the OEM code page on DOS, OS/2 and Win3.x ports but ISO coding (Latin-1 etc.) everywhere else; and Nico Mak's WinZip 6.x does not allow 8-bit passwords at all. UnZip 5.3 (or newer) attempts to use the default character set first (e. g., Latin-1), followed by the alternate one (e. g., OEM code page) to test passwords. On EBCDIC systems, if both of these fail, EBCDIC encoding will be tested as a last resort. (EBCDIC is not tested on non-EBCDIC systems, because there are no known archivers that encrypt using EBCDIC encoding.) ISO character encodings other than Latin-1 are not supported. The new addition of (partially) Unicode (resp. UTF-8) support in UnZip 6.0 has not yet been adapted to the encryption password handling in unzip . On systems that use UTF-8 as native character encoding, unzip simply tries decryption with the native UTF-8 encoded password; the built-in attempts to check the password in translated encoding have not yet been adapted for UTF-8 support and will consequently fail.
To use unzip to extract all members of the archive letters. zip into the current directory and subdirectories below it, creating any subdirectories as necessary:
To extract all members of letters. zip into the current directory only:
To test letters. zip , printing only a summary message indicating whether the archive is OK or not:
To test all zipfiles in the current directory, printing only the summaries:
(The backslash before the asterisk is only required if the shell expands wildcards, as in Unix; double quotes could have been used instead, as in the source examples below.) To extract to standard output all members of letters. zip whose names end in. tex , auto-converting to the local end-of-line convention and piping the output into more (1):
To extract the binary file paper1.dvi to standard output and pipe it to a printing program:
To extract all FORTRAN and C source files--*.f, *.c, *.h, and Makefile--into the /tmp directory:
(the double quotes are necessary only in Unix and only if globbing is turned on). To extract all FORTRAN and C source files, regardless of case (e. g., both *.c and *.C, and any makefile, Makefile, MAKEFILE or similar):
To extract any such files but convert any uppercase MS-DOS or VMS names to lowercase and convert the line-endings of all of the files to the local standard (without respect to any files that might be marked ''binary''):
To extract only newer versions of the files already in the current directory, without querying (NOTE: be careful of unzipping in one timezone a zipfile created in another--ZIP archives other than those created by Zip 2.1 or later contain no timezone information, and a ''newer'' file from an eastern timezone may, in fact, be older):
To extract newer versions of the files already in the current directory and to create any files not already there (same caveat as previous example):
To display a diagnostic screen showing which unzip and zipinfo options are stored in environment variables, whether decryption support was compiled in, the compiler with which unzip was compiled, etc.:
In the last five examples, assume that UNZIP or UNZIP_OPTS is set to - q. To do a singly quiet listing:
To do a doubly quiet listing:
(Note that the ''.zip '' is generally not necessary.) To do a standard listing:
(Extra minuses in options don't hurt.)
The current maintainer, being a lazy sort, finds it very useful to define a pair of aliases: tt for '' unzip - tq '' and ii for '' unzip - Z '' (or '' zipinfo ''). One may then simply type '' tt zipfile '' to test an archive, something that is worth making a habit of doing. With luck unzip will report '' No errors detected in compressed data of zipfile. zip ,'' after which one may breathe a sigh of relief.
The maintainer also finds it useful to set the UNZIP environment variable to '' - aL '' and is tempted to add '' - C '' as well. His ZIPINFO variable is set to '' - z ''.
DIAGNOSTICS.
The exit status (or error level) approximates the exit codes defined by PKWARE and takes on the following values, except under VMS:
normal; no errors or warnings detected.
one or more warning errors were encountered, but processing completed successfully anyway. This includes zipfiles where one or more files was skipped due to unsupported compression method or encryption with an unknown password.
a generic error in the zipfile format was detected. Processing may have completed successfully anyway; some broken zipfiles created by other archivers have simple work-arounds.
a severe error in the zipfile format was detected. Processing probably failed immediately.
unzip was unable to allocate memory for one or more buffers during program initialization.
unzip was unable to allocate memory or unable to obtain a tty to read the decryption password(s).
unzip was unable to allocate memory during decompression to disk.
unzip was unable to allocate memory during in-memory decompression.
[currently not used]
the specified zipfiles were not found.
invalid options were specified on the command line.
no matching files were found.
the disk is (or was) full during extraction.
the end of the ZIP archive was encountered prematurely.
the user aborted unzip prematurely with control-C (or similar)
testing or extraction of one or more files failed due to unsupported compression methods or unsupported decryption.
no files were found due to bad decryption password(s). (If even one file is successfully processed, however, the exit status is 1.)
VMS interprets standard Unix (or PC) return values as other, scarier-looking things, so unzip instead maps them into VMS-style status codes. The current mapping is as follows: 1 (success) for normal exit, 0x7fff0001 for warning errors, and (0x7fff000? + 16*normal_unzip_exit_status) for all other errors, where the '?' is 2 (error) for unzip values 2, 9-11 and 80-82, and 4 (fatal error) for the remaining ones (3-8, 50, 51). In addition, there is a compilation option to expand upon this behavior: defining RETURN_CODES results in a human-readable explanation of what the error status means.
Multi-part archives are not yet supported, except in conjunction with zip . (All parts must be concatenated together in order, and then '' zip - F '' (for zip 2.x ) or '' zip - FF '' (for zip 3.x ) must be performed on the concatenated archive in order to ''fix'' it. Also, zip 3.0 and later can combine multi-part (split) archives into a combined single-file archive using '' zip - s - inarchive - O outarchive ''. See the zip 3 manual page for more information.) This will definitely be corrected in the next major release.
Archives read from standard input are not yet supported, except with funzip (and then only the first member of the archive can be extracted).
Archives encrypted with 8-bit passwords (e. g., passwords with accented European characters) may not be portable across systems and/or other archivers. See the discussion in DECRYPTION above.
unzip 's - M (''more'') option tries to take into account automatic wrapping of long lines. However, the code may fail to detect the correct wrapping locations. First, TAB characters (and similar control sequences) are not taken into account, they are handled as ordinary printable characters. Second, depending on the actual system / OS port, unzip may not detect the true screen geometry but rather rely on "commonly used" default dimensions. The correct handling of tabs would require the implementation of a query for the actual tabulator setup on the output console.
Dates, times and permissions of stored directories are not restored except under Unix. (On Windows NT and successors, timestamps are now restored.)
[MS-DOS] When extracting or testing files from an archive on a defective floppy diskette, if the ''Fail'' option is chosen from DOS's ''Abort, Retry, Fail?'' message, older versions of unzip may hang the system, requiring a reboot. This problem appears to be fixed, but control-C (or control-Break) can still be used to terminate unzip .
Under DEC Ultrix, unzip would sometimes fail on long zipfiles (bad CRC, not always reproducible). This was apparently due either to a hardware bug (cache memory) or an operating system bug (improper handling of page faults?). Since Ultrix has been abandoned in favor of Digital Unix (OSF/1), this may not be an issue anymore.
[Unix] Unix special files such as FIFO buffers (named pipes), block devices and character devices are not restored even if they are somehow represented in the zipfile, nor are hard-linked files relinked. Basically the only file types restored by unzip are regular files, directories and symbolic (soft) links.
[OS/2] Extended attributes for existing directories are only updated if the - o (''overwrite all'') option is given. This is a limitation of the operating system; because directories only have a creation time associated with them, unzip has no way to determine whether the stored attributes are newer or older than those on disk. In practice this may mean a two-pass approach is required: first unpack the archive normally (with or without freshening/updating existing files), then overwrite just the directory entries (e. g., '' unzip - o foo */ '').
[VMS] When extracting to another directory, only the [.foo] syntax is accepted for the - d option; the simple Unix foo syntax is silently ignored (as is the less common VMS foo. dir syntax).
[VMS] When the file being extracted already exists, unzip 's query only allows skipping, overwriting or renaming; there should additionally be a choice for creating a new version of the file. In fact, the ''overwrite'' choice does create a new version; the old version is not overwritten or deleted.
The Info-ZIP home page is currently at.
and the ftp site at.
The primary Info-ZIP authors (current semi-active members of the Zip-Bugs workgroup) are: Ed Gordon (Zip, general maintenance, shared code, Zip64, Win32, Unix, Unicode); Christian Spieler (UnZip maintenance coordination, VMS, MS-DOS, Win32, shared code, general Zip and UnZip integration and optimization); Onno van der Linden (Zip); Mike White (Win32, Windows GUI, Windows DLLs); Kai Uwe Rommel (OS/2, Win32); Steven M. Schweda (VMS, Unix, support of new features); Paul Kienitz (Amiga, Win32, Unicode); Chris Herborth (BeOS, QNX, Atari); Jonathan Hudson (SMS/QDOS); Sergio Monesi (Acorn RISC OS); Harald Denker (Atari, MVS); John Bush (Solaris, Amiga); Hunter Goatley (VMS, Info-ZIP Site maintenance); Steve Salisbury (Win32); Steve Miller (Windows CE GUI), Johnny Lee (MS-DOS, Win32, Zip64); and Dave Smith (Tandem NSK).
The following people were former members of the Info-ZIP development group and provided major contributions to key parts of the current code: Greg ''Cave Newt'' Roelofs (UnZip, unshrink decompression); Jean-loup Gailly (deflate compression); Mark Adler (inflate decompression, fUnZip).
The author of the original unzip code upon which Info-ZIP's was based is Samuel H. Smith; Carl Mascott did the first Unix port; and David P. Kirschbaum organized and led Info-ZIP in its early days with Keith Petersen hosting the original mailing list at WSMR-SimTel20. The full list of contributors to UnZip has grown quite large; please refer to the CONTRIBS file in the UnZip source distribution for a relatively complete version.
Manual Reference Pages - UNZIPSFX (1)
SYNOPSIS.
DESCRIÇÃO.
Note that self-extracting archives made with unzipsfx are no more (or less) portable across different operating systems than is the unzip executable itself. In general a self-extracting archive made on a particular Unix system, for example, will only self-extract under the same flavor of Unix. Regular unzip may still be used to extract the embedded archive as with any normal zipfile, although it will generate a harmless warning about extra bytes at the beginning of the zipfile. Despite this , however, the self-extracting archive is technically not a valid ZIP archive, and PKUNZIP may be unable to test or extract it. This limitation is due to the simplistic manner in which the archive is created; the internal directory structure is not updated to reflect the extra bytes prepended to the original zipfile.
OPÇÕES.
See unzip (1) for a more complete description of these options.
(Support for regular ASCII text-conversion may be removed in future versions, since it is simple enough for the archives creator to ensure that text files have the appropriate format for the local OS. EBCDIC conversion will of course continue to be supported since the zipfile format implies ASCII storage of text files.)
See unzip (1) for a more complete description of these modifiers.
ENVIRONMENT OPTIONS.
DECRYPTION.
AUTORUN COMMAND.
When unzipsfx recognizes the $AUTORUN$> token at the beginning of the Zip archive comment, the remainder of the first line of the comment (until the first newline character) is passed as a shell command to the operating system using the C rtl system função. Before executing the command, unzipsfx displays the command on the console and prompts the user for confirmation. When the user has switched off prompting by specifying the - q option, autorun commands are never executed.
In case the archive comment contains additional lines of text, the remainder of the archive comment following the first line is displayed normally, unless quiet operation was requested by supplying a - q option.
To create the same archive under MS-DOS, OS/2 or NT (note the use of the /b [binary] option to the copy command):
(The VMS append command may also be used. The second command installs the new program as a foreign command capable of taking arguments. The third line assumes that Zip is already installed as a foreign command.) Under AmigaDOS:
(MakeSFX is included with the UnZip source distribution and with Amiga binary distributions. zip - A doesnt work on Amiga self-extracting archives.) To test (or list) the newly created self-extracting archive:
To test letters quietly, printing only a summary message indicating whether the archive is OK or not:
To extract the complete contents into the current directory, recreating all files and subdirectories as necessary:
To extract all *.txt files (in Unix quote the *):
To extract everything except the *.txt files:
To extract only the README file to standard output (the screen):
To print only the zipfile comment:
LIMITATIONS.
Another problem with the current implementation is that any archive with junk prepended to the beginning technically is no longer a zipfile (unless zip (1) is used to adjust the zipfile offsets appropriately, as noted above). unzip (1) takes note of the prepended bytes and ignores them since some file-transfer protocols, notably MacBinary, are also known to prepend junk. But PKWAREs archiver suite may not be able to deal with the modified archive unless its offsets have been adjusted.
unzipsfx has no knowledge of the users PATH, so in general an archive must either be in the current directory when it is invoked, or else a full or relative path must be given. If a user attempts to extract the archive from a directory in the PATH other than the current one, unzipsfx will print a warning to the effect, cant find myself. This is always true under Unix and may be true in some cases under MS-DOS, depending on the compiler used (Microsoft C fully qualifies the program name, but other compilers may not). Under OS/2 and NT there are operating-system calls available that provide the full path name, so the archive may be invoked from anywhere in the users path. The situation is not known for AmigaDOS, Atari TOS, MacOS, etc.
As noted above, a number of the normal unzip (1) functions have been removed in order to make unzipsfx smaller: usage and diagnostic info, listing functions and extraction to other directories. Also, only stored and deflated files are supported. The latter limitation is mainly relevant to those who create SFX archives, however.
VMS users must know how to set up self-extracting archives as foreign commands in order to use any of unzipsfx s options. This is not necessary for simple extraction, but the command to do so then becomes, e. g., run letters (to continue the examples given above).
unzipsfx on the Amiga requires the use of a special program, MakeSFX, in order to create working self-extracting archives; simple concatenation does not work. (For technically oriented users, the attached archive is defined as a debug hunk.) There may be compatibility problems between the ROM levels of older Amigas and newer ones.
All current bugs in unzip (1) exist in unzipsfx as well.
UNZIPSFX.
Updated: 20 April 2009 (v6.0)
DESCRIÇÃO.
Note that self-extracting archives made with unzipsfx are no more (or less) portable across different operating systems than is the unzip executable itself. In general a self-extracting archive made on a particular Unix system, for example, will only self-extract under the same flavor of Unix. Regular unzip may still be used to extract the embedded archive as with any normal zipfile, although it will generate a harmless warning about extra bytes at the beginning of the zipfile. Despite this , however, the self-extracting archive is technically not a valid ZIP archive, and PKUNZIP may be unable to test or extract it. This limitation is due to the simplistic manner in which the archive is created; the internal directory structure is not updated to reflect the extra bytes prepended to the original zipfile.
If unzipsfx is compiled with SFX_EXDIR defined, the following option is also enabled: [ - d exdir ] An optional directory to which to extract files. By default, all files and subdirectories are recreated in the current directory; the - d option allows extraction in an arbitrary directory (always assuming one has permission to write to the directory). The option and directory may be concatenated without any white space between them, but note that this may cause normal shell behavior to be suppressed. In particular, ``-d.
'' (tilde) is expanded by Unix C shells into the name of the user's home directory, but ``-d.
'' is treated as a literal subdirectory ``
See unzip (1) for a more complete description of these options.
(Support for regular ASCII text-conversion may be removed in future versions, since it is simple enough for the archive's creator to ensure that text files have the appropriate format for the local OS. EBCDIC conversion will of course continue to be supported since the zipfile format implies ASCII storage of text files.)
See unzip (1) for a more complete description of these modifiers.
ENVIRONMENT OPTIONS.
DECRYPTION.
AUTORUN COMMAND.
When unzipsfx recognizes the ``$AUTORUN$>'' token at the beginning of the Zip archive comment, the remainder of the first line of the comment (until the first newline character) is passed as a shell command to the operating system using the C rtl ``system'' function. Before executing the command, unzipsfx displays the command on the console and prompts the user for confirmation. When the user has switched off prompting by specifying the - q option, autorun commands are never executed.
In case the archive comment contains additional lines of text, the remainder of the archive comment following the first line is displayed normally, unless quiet operation was requested by supplying a - q option.
To create the same archive under MS-DOS, OS/2 or NT (note the use of the /b [binary] option to the copy command):
(The VMS append command may also be used. The second command installs the new program as a ``foreign command'' capable of taking arguments. The third line assumes that Zip is already installed as a foreign command.) Under AmigaDOS:
(MakeSFX is included with the UnZip source distribution and with Amiga binary distributions. ``zip - A'' doesn't work on Amiga self-extracting archives.) To test (or list) the newly created self-extracting archive:
To test letters quietly, printing only a summary message indicating whether the archive is OK or not:
To extract the complete contents into the current directory, recreating all files and subdirectories as necessary:
To extract all *.txt files (in Unix quote the `*'):
To extract everything except the *.txt files:
To extract only the README file to standard output (the screen):
To print only the zipfile comment:
LIMITATIONS.
Another problem with the current implementation is that any archive with ``junk'' prepended to the beginning technically is no longer a zipfile (unless zip (1) is used to adjust the zipfile offsets appropriately, as noted above). unzip (1) takes note of the prepended bytes and ignores them since some file-transfer protocols, notably MacBinary, are also known to prepend junk. But PKWARE's archiver suite may not be able to deal with the modified archive unless its offsets have been adjusted.
unzipsfx has no knowledge of the user's PATH, so in general an archive must either be in the current directory when it is invoked, or else a full or relative path must be given. If a user attempts to extract the archive from a directory in the PATH other than the current one, unzipsfx will print a warning to the effect, ``can't find myself.'' This is always true under Unix and may be true in some cases under MS-DOS, depending on the compiler used (Microsoft C fully qualifies the program name, but other compilers may not). Under OS/2 and NT there are operating-system calls available that provide the full path name, so the archive may be invoked from anywhere in the user's path. The situation is not known for AmigaDOS, Atari TOS, MacOS, etc.
As noted above, a number of the normal unzip (1) functions have been removed in order to make unzipsfx smaller: usage and diagnostic info, listing functions and extraction to other directories. Also, only stored and deflated files are supported. The latter limitation is mainly relevant to those who create SFX archives, however.
VMS users must know how to set up self-extracting archives as foreign commands in order to use any of unzipsfx 's options. This is not necessary for simple extraction, but the command to do so then becomes, e. g., ``run letters'' (to continue the examples given above).
unzipsfx on the Amiga requires the use of a special program, MakeSFX, in order to create working self-extracting archives; simple concatenation does not work. (For technically oriented users, the attached archive is defined as a ``debug hunk.'') There may be compatibility problems between the ROM levels of older Amigas and newer ones.
All current bugs in unzip (1) exist in unzipsfx as well.
DIAGNOSTICS.
AUTHORS.
Find out which hostname(s)
given IP or other hostnames for the server.
- Powered by - Running on -
Copyright 2004-2017 Sascha Nitsch Unternehmensberatung UG(haftungsbeschränkt)
Comments
Post a Comment