cat dg_tar.ksh
tar cpfX - dg.exclude dgmenu > dg.tar
 
$ cat dg.exclude
dgmenu/old
dgmenu/conf
dgmenu/log
afiedt.buf
*.old
*.bkup

Notes:
1. dgmenu is the directory that we are creating a tar-ball for
2. c – create a new archive containing the specified items (in this case excluding the contents of dg.exclude criteria)
3. f – the name of the archive file to create
4. p – preserve file permissions


Comments are closed