From: Alexander Kirey <kirey@mmk.ru>
To: community@altlinux.ru
Subject: Re: [Comm] Re: du ошибается...
Date: Wed, 18 Dec 2002 16:27:34 +0500
Message-ID: <3E005BA6.9060605@mmk.ru> (raw)
In-Reply-To: <20021217134909.GB7033@ungrund>
Alexey Tourbin пишет:
>On Tue, Dec 17, 2002 at 11:15:14AM +0300, Dmitry V. Levin wrote:
>
>
>>Вот вам пример в числах:
>>
>>1. Скомпилируйте lseek.c (attached),
>>2. Запустите
>> $ ./lseek 0x400000000 ~/tmp/empty
>>3. Сравните вывод от
>> $ ls -lh ~/tmp/empty
>> и
>> $ du -h ~/tmp/empty
>>
>>
>
>Идея понятна, только программа не работает. :(
>
>
Sorry, не смог сразу ответить...
Да, идея понятна, хотя результат не очень :(
У меня в этом году после установки Linux уже крышу сорвало
от нахлынувшей информации :)
Что касается того, как я использовал du в примере, когда создал тред, то
разобрался: du -a, просетлило по поводу содержимого...
В примере "lseek.c" изменил строчку:
offset = strtoull (av[1], 0, 0)
на
offset = 100000000;
$ gcc lseek.c -o lseek
>$ ./lseek 0x400000000 ~/tmp/empty
>./lseek: lseek: 0: Invalid argument
>$
>
>
>
Как просил Dmitry V. Levin:
$ ls -lh ~/tmp/empty
-rw------- 1 test test 95M Дек 17 14:47 /home/test/tmp/empty
$ du -h ~/tmp/empty
12K /home/test/tmp/empty
$
--
Александр Кирей
prev parent reply other threads:[~2002-12-18 11:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-12-17 8:15 ` [Comm] Re: [sisyphus] " Dmitry V. Levin
2002-12-17 13:49 ` [Comm] " Alexey Tourbin
2002-12-17 18:11 ` [Comm] " ASA
2002-12-17 20:01 ` Vitaly Lipatov
2002-12-17 20:12 ` Michael Shigorin
2002-12-18 11:27 ` Alexander Kirey [this message]
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=3E005BA6.9060605@mmk.ru \
--to=kirey@mmk.ru \
--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