echo “/usr/openv/upgrade” >exclude_file
tar -cv -X ./exclude_file -f /usr/openv/upgrade/before_upgrade.tar /usr/openv
不同操作系统tar的语法略有差异,上述命令在AIX, Linux下测试通过
tar备份时排出某个目录的方法
原文:https://www.cnblogs.com/netbackup/p/9063741.html