Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: [tlug] Using tar to archive files
- Date: Wed, 7 Mar 2007 15:21:25 +0900
- From: "Edmund Edgar" <lists@??>
- Subject: Re: [tlug] Using tar to archive files
- References: <45EE48F8.9050506@example.com>
Hi Dave.
> tar -cvzf archive.tgz -C directory * --exclude directory/subdir
I would have thought the * would get expanded by the shell before it even reached the tar command. That means it's going to feed tar everything in your working directory, not everything in the directory you're telling tar to change to.
Maybe something like this would work?
tar -cvzf archive.tgz -C directory . --exclude directory/subdir
Not sure I understood the bit about empty directories, so I can't help you with that, I'm afraid... (If they're under directory/, the above should catch them whether they're empty or not. Are you trying to get the sub-directories under directory/, but ignore their contents?)
Edmund
- Follow-Ups:
- Re: [tlug] Using tar to archive files
- From: Dave M G
- References:
- [tlug] Using tar to archive files
- From: Dave M G
Home | Main Index | Thread Index
- Prev by Date: [tlug] Using tar to archive files
- Next by Date: Re: [tlug] Using tar to archive files
- Previous by thread: [tlug] Using tar to archive files
- Next by thread: Re: [tlug] Using tar to archive files
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links