【发布时间】:2021-05-17 19:07:16
【问题描述】:
我使用-T参数将目录写入文件中。
tar -czvf $LOCAL_FILE_SAVE -T $TXT_FILE
是否可以忽略 txt 的第一行或使用特殊键来使用 like 注释?
例子:
#comment (Ignore this line)
/home/user/stack
【问题讨论】:
-
使用
sed、awk甚至find之类的工具根据您的输入文件生成所需的文件列表。然后让tarread the files from stdin