看板FreeBSD
標 題Re: 使用tar的問題!
發信站SayYA 資訊站 (Mon Jan 16 17:07:18 2006)
轉信站ptt!ctu-reader!news.nctu!SayYa
※ 引述《[email protected] (悸動)》之銘言:
> ※ 引述《[email protected] (Angou)》之銘言:
> > 各位先進,請問:
> > 使用tar時可否做到下列動作?
> > 當tar檔已存在的情形下:
> > 1. 只解出其中部分檔案。
> (for bsdtar) 看 --include 這個指令。
--include pattern (-W include=pattern)
Process only files or directories that match the specified pat-
tern. Note that exclusions specified with --exclude take prece-
dence over inclusions. If no inclusions are explicitly speci-
fied, all entries are processed by default. The --include option
is especially useful when filtering archives. For example, the
command
tar -c -f new.tar --include='*foo*' @old.tgz
creates a new archive new.tar containing only the entries from
old.tgz containing the string `foo'.
> > 2. 另外壓入其他檔案。
> 本來用 -c,改用 -r 或 -u。
-r Like -c, but new entries are appended to the archive. Note that
this only works on uncompressed archives stored in regular files.
The -f option is required.
--
*****************************************************
* 瘋狂小惡魔分享討論區 *
*
http://www.freestudio.twbbs.org/index.php *
* 無名相簿-appleboy *
*
http://www.wretch.cc/album/appleboy *
*****************************************************
--
※ Origin: SayYA 資訊站 <bbs.sayya.org>
◆ From: freebsd.ee.ccu.edu.tw