Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
以下のコマンドを使用して、特定のディレクトリ内の各アーカイブ内のファイルの詳細なリストを取得しています。unzip-l" .zip "。ただし、このコマンドの問題は、アーカイブ内のすべてのファイルを登録していることです。リストするファイルの数をアーカイブごとに5つに制限したいと思います。私はsshを使用しています。ありがとう。:)
headまたはを使用tailして、上位 n 行または下位 n 行を制限できます
head
tail
unzip -l a.zip | head -n 5