Mar 8, 2005 #1 Nerdhurd Technical User Jan 11, 2005 57 US Howdy folks, is there a way to tarball a series of directories while exluding a directory? Id like to tar -cvzf archive.tgz home/username/basedir I want to exclude a directory within basedir called: test is there a way to do this? Thanks!
Howdy folks, is there a way to tarball a series of directories while exluding a directory? Id like to tar -cvzf archive.tgz home/username/basedir I want to exclude a directory within basedir called: test is there a way to do this? Thanks!
Mar 8, 2005 1 #2 TonyGroves Programmer Aug 13, 2003 2,389 IE You could use the option [tt]--exclude=pattern[/tt] . Upvote 0 Downvote
Mar 8, 2005 Thread starter #3 Nerdhurd Technical User Jan 11, 2005 57 US Thanks, sorry I did try that previously but for whatever reason the directory was still being tarballed: tar -cvzf archive.tgz home/username/basedir -exclude /home/username/basedir/test/* Upvote 0 Downvote
Thanks, sorry I did try that previously but for whatever reason the directory was still being tarballed: tar -cvzf archive.tgz home/username/basedir -exclude /home/username/basedir/test/*
Mar 8, 2005 #4 TonyGroves Programmer Aug 13, 2003 2,389 IE According to man tar, the syntax is [tt]--exclude=file[/tt] . Upvote 0 Downvote
Mar 8, 2005 #5 xmb Programmer Feb 11, 2005 213 CH --exclude is pretty much a pattern, handy for '.*' to exclude dotfiles, but works on the global path text. GNU tar at least. --exclude=PATTERN exclude files matching PATTERN . Mac for productivity .. Linux for developement ... Windows for solitaire Upvote 0 Downvote
--exclude is pretty much a pattern, handy for '.*' to exclude dotfiles, but works on the global path text. GNU tar at least. --exclude=PATTERN exclude files matching PATTERN . Mac for productivity .. Linux for developement ... Windows for solitaire