logo
  • 教程列表
  • SO官方文檔
  • 使用'tar'命令進行檔案壓縮
    • 壓縮資料夾
    • 從存檔中提取資料夾
    • 列出存檔內容
    • 壓縮並排除一個或多個資料夾
    • 剝離領先元件
    • 列出檔案的內容
  1. StackOverflow 文件
  2. GNU/Linux 教程
  3. 使用'tar'命令進行檔案壓縮
  4. 剝離領先元件

剝離領先元件

Created: November-22, 2018

要刪除任意數量的主要元件,請使用 –strip-components 選項:

 --strip-components=NUMBER
   strip NUMBER leading components from file names on extraction

例如,要刪除前導資料夾,請使用:

tar -xf --strip-components=1 archive-name.tar
  • 列出檔案的內容
  • 壓縮並排除一個或多個資料夾

Copyright © 2018. All right reserved

tastones.com 备案号:鲁ICP备18045372号-1

  • 關於本站
  • 免責聲明