From: Sergey Bolshakov <s.bolshakov@sam-solutions.net>
To: community@altlinux.ru
Subject: Re: [Comm] tar
Date: Sat, 09 Aug 2003 14:51:04 +0300
Message-ID: <m3llu3f3rr.fsf@pc313.belcaf.minsk.by> (raw)
In-Reply-To: <20030809152511.77aad4ae.michael@michael.rsuh.ru> (Michael Bykov's message of "Sat, 9 Aug 2003 15:25:11 +0400")
>>>>> "Michael" == Michael Bykov <michael@michael.rsuh.ru> writes:
> On Sat, 09 Aug 2003 13:36:36 +0300
> Sergey Bolshakov <s.bolshakov@sam-solutions.net> wrote:
>>
>> Иными словами, не стоит рассчитывать, что вам удастся
>> вытянуть из архива то, чего там нет.
>> В качестве домашнего задания предлагается обсудить,
>> чем плох вариант вида tar x \*xxx.txt
> А) Файл там есть.
> Б) tar x \*xxx.txt - Это то есть как? Как вы понимаете,
> ваш вариант неверен, не работает.
> В качестве домашнего задания вопрос - вы умеете достать
> _один_ файл, который в архиве есть, из архива? Смешно,
> сколько людей предложили мне почитать документацию, не
> умея ответить на вопрос.
> Вот строчка из info:
> # tar --extract --ungzip --file=name.tgz
> ./path/to/file.txt
> На отсутствие не ругается, но и не извлекает. Наверное,
> баг.
--- %< ---
$ ls -l
total 20
-rw-r--r-- 1 me me 19416 Jun 3 18:02 startup-0.5.tar.bz2
$ tar tjf startup-0.5.tar.bz2
startup-0.5/
startup-0.5/rc.d/
startup-0.5/rc.d/rc
startup-0.5/rc.d/rc.powerfail
startup-0.5/rc.d/rc.sysinit
startup-0.5/rc.d/init.d/
startup-0.5/rc.d/init.d/clock
startup-0.5/rc.d/init.d/fbsetfont
startup-0.5/rc.d/init.d/halt
startup-0.5/rc.d/init.d/killall
startup-0.5/rc.d/init.d/local
startup-0.5/rc.d/init.d/random
startup-0.5/rc.d/init.d/rawdevices
startup-0.5/rc.d/init.d/single
startup-0.5/rc.d/init.d/usb
startup-0.5/rc.d/scripts/
startup-0.5/rc.d/scripts/cleanup
startup-0.5/rc.d/scripts/first_time
startup-0.5/rc.d/scripts/framebuffer_init
startup-0.5/rc.d/scripts/gen_kernel_headers
startup-0.5/rc.d/scripts/idetune
startup-0.5/rc.d/scripts/indexhtml_update
startup-0.5/rc.d/scripts/lang
startup-0.5/rc.d/scripts/load_modules
startup-0.5/rc.d/scripts/rsbac_autotune
startup-0.5/rc.d/scripts/vconfig-update
startup-0.5/adjtime
startup-0.5/inittab
startup-0.5/modules
startup-0.5/setsysfont
startup-0.5/startup.spec
startup-0.5/sysctl.conf
startup-0.5/sysconfig/
startup-0.5/sysconfig/clock
startup-0.5/sysconfig/framebuffer
startup-0.5/sysconfig/init
startup-0.5/sysconfig/rawdevices
startup-0.5/sysconfig/usb
$ tar xjf startup-0.5.tar.bz2 startup-0.5/sysconfig/clock
$ ls -l
total 24
drwxr-xr-x 3 me me 4096 Aug 9 14:44 startup-0.5
-rw-r--r-- 1 me me 19416 Jun 3 18:02 startup-0.5.tar.bz2
$ ls -l startup-0.5/
total 4
drwxr-xr-x 2 me me 4096 Aug 9 14:44 sysconfig
$ ls -l startup-0.5/sysconfig/
total 4
-rw-r--r-- 1 me me 296 Dec 8 2002 clock
$ rm -rf startup-0.5/
$ tar xjf startup-0.5.tar.bz2 \*usb
$ ls -l
total 24
drwxr-xr-x 4 me me 4096 Aug 9 14:44 startup-0.5
-rw-r--r-- 1 me me 19416 Jun 3 18:02 startup-0.5.tar.bz2
$ ls -lR startup-0.5/
startup-0.5/:
total 8
drwxr-xr-x 3 me me 4096 Aug 9 14:44 rc.d
drwxr-xr-x 2 me me 4096 Aug 9 14:44 sysconfig
startup-0.5/rc.d:
total 4
drwxr-xr-x 2 me me 4096 Aug 9 14:44 init.d
startup-0.5/rc.d/init.d:
total 8
-rw-r--r-- 1 me me 5679 May 12 12:05 usb
startup-0.5/sysconfig:
total 4
-rw-r--r-- 1 me me 333 Apr 21 23:41 usb
$
--- %< ---
Как видите, извлечь один файл возможно. Возможно даже два :)
--
next prev parent reply other threads:[~2003-08-09 11:51 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-08-08 16:36 Michael Bykov
2003-08-08 16:41 ` Sergey Bolshakov
2003-08-08 17:19 ` Michael Bykov
2003-08-08 17:25 ` Sergey Bolshakov
2003-08-08 17:50 ` Michael Bykov
2003-08-08 18:50 ` Shur
2003-08-08 22:25 ` Re[2]: " "Werstak"
2003-08-09 10:36 ` Sergey Bolshakov
2003-08-09 11:25 ` Michael Bykov
2003-08-09 11:51 ` Sergey Bolshakov [this message]
2003-08-11 10:56 ` Michael Bykov
2003-08-09 10:36 ` Re[2]: " Michael Bykov
2003-08-08 17:02 ` ILYA Sibgatullin
2003-08-09 10:37 ` Andrey
2003-08-09 10:42 ` Michael Bykov
2003-08-11 3:51 ` BSW
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3llu3f3rr.fsf@pc313.belcaf.minsk.by \
--to=s.bolshakov@sam-solutions.net \
--cc=community@altlinux.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
ALT Linux Community general discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
public-inbox-index community
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.community
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git