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.
我正在使用以下命令来获取特定目录中每个存档中文件的详细列表。解压缩-l“ .zip ”。但是这个命令的问题是它正在征用档案中的所有文件。我想将每个存档列出的文件数限制为 5 个。我正在使用 ssh。谢谢。:)
您可以使用head或tail限制前 n 行或下 n 行
head
tail
unzip -l a.zip | head -n 5