ALT Linux Community general discussions
 help / color / mirror / Atom feed
* [Comm] Удаление первых 72 байта файла
@ 2003-02-23 16:17 Konstantin
  2003-02-23 17:22 ` [Comm] " ASA
  2003-02-23 18:28 ` Aleksey Korolkov
  0 siblings, 2 replies; 5+ messages in thread
From: Konstantin @ 2003-02-23 16:17 UTC (permalink / raw)
  To: community

Как это сделать? du + tail не красиво, а head не может.

-- 
Wake up Neo! Matrrrrr2|234.$@%f3^@af4ga NO CARRIER


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Comm] Re: [Comm] Удаление первых 72 байта файла
  2003-02-23 16:17 [Comm] Удаление первых 72 байта файла Konstantin
@ 2003-02-23 17:22 ` ASA
  2003-02-24 10:43   ` Konstantin
  2003-02-23 18:28 ` Aleksey Korolkov
  1 sibling, 1 reply; 5+ messages in thread
From: ASA @ 2003-02-23 17:22 UTC (permalink / raw)
  To: Konstantin

Hello Konstantin,

Sunday, February 23, 2003, 8:17:41 PM, you wrote:

K> Как это сделать? du + tail не красиво, а head не может.

man dd
для маленьких файлов достаточно эффективно:
dd skip=1 bs=72
для больших файлов imho эффективнее в два вызова:
dd if=file1 skip 72 bs=1 count=65464 >file2
dd if=file1 skip 1 bs=64k >>file2

число 65464 равно 65536-72.

-- 
Best regards,
 ASA                            mailto:llb@udm.ru



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Comm] Удаление первых 72 байта файла
  2003-02-23 16:17 [Comm] Удаление первых 72 байта файла Konstantin
  2003-02-23 17:22 ` [Comm] " ASA
@ 2003-02-23 18:28 ` Aleksey Korolkov
  2003-02-24 10:42   ` Konstantin
  1 sibling, 1 reply; 5+ messages in thread
From: Aleksey Korolkov @ 2003-02-23 18:28 UTC (permalink / raw)
  To: community

On Sun, Feb 23, 2003 at 18:17:41 +0200, Konstantin wrote:

> Как это сделать? du + tail не красиво, а head не может.

tail -c +73 old > new

не красиво?

-- 
WBR, Aleksey Korolkov
PGP key ID: 0xB6F76C1C


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Comm] Удаление первых 72 байта файла
  2003-02-23 18:28 ` Aleksey Korolkov
@ 2003-02-24 10:42   ` Konstantin
  0 siblings, 0 replies; 5+ messages in thread
From: Konstantin @ 2003-02-24 10:42 UTC (permalink / raw)
  To: community

В сообщении от 23 Февраль 2003 20:28 Aleksey Korolkov написал:
> On Sun, Feb 23, 2003 at 18:17:41 +0200, Konstantin wrote:
> > Как это сделать? du + tail не красиво, а head не может.
>
> tail -c +73 old > new
>
> не красиво?

Красиво :) Да, доки - рулез

-- 
Wake up Neo! Matrrrrr2|234.$@%f3^@af4ga NO CARRIER


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Comm] Re: [Comm] Удаление первых 72 байта файла
  2003-02-23 17:22 ` [Comm] " ASA
@ 2003-02-24 10:43   ` Konstantin
  0 siblings, 0 replies; 5+ messages in thread
From: Konstantin @ 2003-02-24 10:43 UTC (permalink / raw)
  To: community

В сообщении от 23 Февраль 2003 19:22 ASA написал:
> Hello Konstantin,
>
> Sunday, February 23, 2003, 8:17:41 PM, you wrote:
>
> K> Как это сделать? du + tail не красиво, а head не может.
>
> man dd
> для маленьких файлов достаточно эффективно:
> dd skip=1 bs=72
> для больших файлов imho эффективнее в два вызова:
> dd if=file1 skip 72 bs=1 count=65464 >file2
> dd if=file1 skip 1 bs=64k >>file2
>
> число 65464 равно 65536-72.

Спасибо.

-- 
Wake up Neo! Matrrrrr2|234.$@%f3^@af4ga NO CARRIER


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-02-24 10:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-23 16:17 [Comm] Удаление первых 72 байта файла Konstantin
2003-02-23 17:22 ` [Comm] " ASA
2003-02-24 10:43   ` Konstantin
2003-02-23 18:28 ` Aleksey Korolkov
2003-02-24 10:42   ` Konstantin

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