How to Tar excluding few sub directories
Many of us would have perform tar of directories for cloning/file movement between the servers. Many times we would have think to exclude some sub-directories which are not needed, so that tar will save some time.
Here you go handy commands to achieve your needs.
Let’s say if you want to tar /u10/groups folder and want to exclude few sub directories under groups.
user@/u10 > tar -cpvzf /tmp/groups.tar.gz groups –exclude-from=excl
user@/u10 > cat excl