tar command packaged exclude specified file

To give an example, to archive / usr / local / src / elasticsearch logs directory but exclude the log under elasticsearch

tar  -zvcf elasticsearch.tar.gz  --exclude=elasticsearch/logs  elasticsearch

Required under / usr / local / src / directory

Guess you like

Origin www.cnblogs.com/MUQINGFENG123/p/11434036.html