Kuro5hin.org: technology and culture, from the trenches
create account | help/FAQ | contact | links | search | IRC | site news
[ Everything | Diaries | Technology | Science | Culture | Politics | Media | News | Internet | Op-Ed | Fiction | Meta | MLP ]
We need your support: buy an ad | premium membership | k5 store

[P]
Lounix Geeks Only!!! (Diaries)

By llimllib
Mon Jul 28th, 2003 at 10:09:32 AM EST

llimllib's Diary

This diary is for Unix Geeks Only. Do not look inside otherwise, you will be bored to tears.

DO NOT PRESS THE RED BUTTON. poll.


[bill@localhost bill]$ ls -al boombastic.m3u
-rw-rw-r--    1 bill     bill         1094 Jul 22 01:01 boombastic.m3u
[bill@localhost bill]$ du -b boombastic.m3u
4096    boombastic.m3u

[bill /home/bill]$ ls -al neural_networks_in_go.pdf
-rw-r--r--    1 bill     bill       196133 Jul 28 08:13 neural_networks_in_go.pdf
[bill /home/bill]$ du -b neural_networks_in_go.pdf
200704    neural_networks_in_go.pdf

Is this the correct behavior for du? Shouldn't it output the same value as ls? It's on an ext3 partition, but I get the same results on a FAT partition. du seems to be rounding up to the next highest 4096*x value.

Sponsors
Voxel dot net
o Managed Servers
o Managed Clusters
o Virtual Hosting


Collocated Linux/FreeBSD Server
As low as $45/month
o Root on your own FreeBSD or Linux server
o Very fast, triple-homed network
o NO hardware or setup fees, unlimited support
Testimonials from K5 Users

Login
Make a new account
Username:
Password:

Note: You must accept a cookie to log in.

Poll
I pushed the red button
o yes 84%
o no 15%

Votes: 19
Results | Other Polls

Related Links
o llimllib's Diary


View: Display: Sort:
Lounix Geeks Only!!! | 35 comments (35 topical, 0 editorial, 0 hidden)
Go neural nets (none / 0) (#30)
by awgsilyari on Mon Jul 28th, 2003 at 12:30:10 PM EST
(moc.wnlaruen@ttocs)

Are you using the networks for position evaluation? Or move ordering? Or move selection? Or what...

Also I assume you've studied TD-Gammon to death, correct? ;-)

--------
Please direct SPAM to john@neuralnw.com

nope (none / 0) (#34)
by llimllib on Mon Jul 28th, 2003 at 02:09:06 PM EST
(llimllib at f2o .. org)

I'm not doing TD-Learning. I've studied td-gammon in passing, but I'm trying to further van der Werf's research on training using databases of expert games. I give details in this comment. Immediately for position evaluation, later for move ordering, maybe after that for move selection. We'll see where it heads. In any case, I plan to fairly soon write up a k5 article about it, especially after the interest that people have shown here. I just want to write a kick-ass article and not a shitty little one, so I'm not rushing it.


Peace.
[ Parent ]
You've been HACKED! (4.50 / 4) (#9)
by President Saddam on Mon Jul 28th, 2003 at 10:23:06 AM EST
(presidentsaddam@iraqmail.com)

If there's an inconsistency, it's because HACKERs must be using the extra space to store PIRATE SOFTWARE and ILLEGAL PORNOGRAPHY!!! You must destroy your harddrive immediately to erase the evidence...

---
Allah Akbar

HELP ME (5.00 / 4) (#16)
by llimllib on Mon Jul 28th, 2003 at 10:30:24 AM EST
(llimllib at f2o .. org)

What command can I use to get the evil hackers off my system? I tried:

[bill /home/bill]$ delete everything
delete: command not found
[bill /home/bill]$ stop virus
stop: command not found
[bill /home/bill]$ make american
make: * No rule to make target `american'.  Stop.

What do I do?


Peace.
[ Parent ]

Amazing (5.00 / 3) (#23)
by President Saddam on Mon Jul 28th, 2003 at 10:43:34 AM EST
(presidentsaddam@iraqmail.com)

Even gnu hippy software is right half the time. Americans are indeed targets, as 'make' so accurately pointed out.

---
Allah Akbar
[ Parent ]

Be sure to try: (5.00 / 6) (#21)
by Canthros on Mon Jul 28th, 2003 at 10:40:49 AM EST
http://www.punchdrunkmonkeyman.com

rm -rf /.

This will remove malcontents from your file system and re-instate (-r) a free (-f) government in its place. HTH

--
It's now obvious you are either A) Gay or B) Female, or possibly both.
RyoCokey
[ Parent ]

you liar (5.00 / 2) (#35)
by wji on Mon Jul 28th, 2003 at 10:43:16 PM EST
(elh one at sympatico dot see eh)

We all know it will remake mideast minus real freedom slash do terrorism.

"Congratulations, you failed as a goth. That makes you emo." --unknownlamer
[ Parent ]
Deleting slashdot. Now there's an idea. (n/t) (5.00 / 2) (#31)
by Cloaked User on Mon Jul 28th, 2003 at 12:36:25 PM EST


--
"What the fuck do you mean 'Are you inspired to come to work'? Of course I'm not 'inspired'. It's a job for God's sake! The money's enough and the work's not so crap that I leave."
[ Parent ]
Formatted block size (5.00 / 2) (#7)
by misfit13b on Mon Jul 28th, 2003 at 10:21:53 AM EST

You probably have 4096 sized blocks in your filesystem. You can have 1024, 2048 and 4096 bytes per block in ext3.

but (none / 0) (#12)
by llimllib on Mon Jul 28th, 2003 at 10:26:14 AM EST
(llimllib at f2o .. org)

shouldn't -b report apparent size, as shown in the man page snippet below?


Peace.
[ Parent ]
Might depend (none / 0) (#22)
by misfit13b on Mon Jul 28th, 2003 at 10:41:05 AM EST

on version. This man doc says -b = -B

I got this:

wsadmin@linux:~$ du --help
Usage: du [OPTION]... [FILE]...
Summarize disk usage of each FILE, recursively for directories.

-a, --all write counts for all files, not just directories
--block-size=SIZE use SIZE-byte blocks
-b, --bytes print size in bytes
-c, --total produce a grand total
-D, --dereference-args dereference PATHs when symbolic link
-h, --human-readable print sizes in human readable format (e.g., 1K 234M 2G)
-H, --si likewise, but use powers of 1000 not 1024
-k, --kilobytes like --block-size=1024
-l, --count-links count sizes many times if hard linked
-L, --dereference dereference all symbolic links
-m, --megabytes like --block-size=1048576
-S, --separate-dirs do not include size of subdirectories
-s, --summarize display only a total for each argument
-x, --one-file-system skip directories on different filesystems
-X FILE, --exclude-from=FILE Exclude files that match any pattern in FILE.
--exclude=PAT Exclude files that match PAT.
--max-depth=N print the total for a directory (or file, with --all) only if it is N or fewer levels below the command line argument; --max-depth=0 is the same as --summarize --help display this help and exit
--version output version information and exit


wsadmin@linux:~$ ls -al cvsinit
-rwxr--r-- 1 wsadmin users 100 Jan 25 2003 cvsinit*

wsadmin@linux:~$ du -b cvsinit
4096 cvsinit


[ Parent ]
yup (5.00 / 1) (#26)
by llimllib on Mon Jul 28th, 2003 at 10:51:43 AM EST
(llimllib at f2o .. org)

I was used to my old du, had just reinstalled my computer, and looked at the man page without actually *reading* that there was no more apparent size.


Peace.
[ Parent ]
Yes. (3.33 / 3) (#6)
by it certainly is on Mon Jul 28th, 2003 at 10:19:23 AM EST
http://www.kyz.uklinux.net/

How many disk blocks does file take up? Multiply disk blocks used by size of disk block.

--apparent-size
              print apparent sizes, rather than disk usage; although the
              apparent size is usually smaller, it may be larger due to holes
              in (`sparse') files, internal fragmentation, indirect blocks,
              and the like

-B, --block-size=SIZE
              use SIZE-byte blocks

-b, --bytes
              equivalent to `--apparent-size --block-size=1'


kur0shin.org -- it certainly is

Godwin's law [...] is impossible to violate except with an infinitely long thread that doesn't mention nazis.

Interesting (5.00 / 1) (#8)
by j00z m4573r on Mon Jul 28th, 2003 at 10:22:57 AM EST
(j00zm4573r @ j00zm0mz dot c0m) http://m4573r.dnsalias.net/free/

-b is what he's using, and that's supposed to use aparent size? Oddish that it still reports a block instead of the actual aparent size?

Free shell access!
[ Parent ]

that's my point (none / 0) (#11)
by llimllib on Mon Jul 28th, 2003 at 10:25:43 AM EST
(llimllib at f2o .. org)

with -b, I thought I'd get apparent size, not disk size.


Peace.
[ Parent ]
Well, it works here: (5.00 / 1) (#27)
by it certainly is on Mon Jul 28th, 2003 at 10:51:54 AM EST
http://www.kyz.uklinux.net/

kyz@furnace:~$ du --version
du (coreutils) 5.0
Written by Torbjorn Granlund, David MacKenzie, Larry McVoy, Paul Eggert, and Jim Meyering.

Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
kyz@furnace:~$ ls -l bibleblack4-1.wmv
-rw-r--r-- 1 kyz kyz 21493384 2003-07-26 06:46 bibleblack4-1.wmv
kyz@furnace:~$ du bibleblack4-1.wmv
21020 bibleblack4-1.wmv
kyz@furnace:~$ du -b bibleblack4-1.wmv
21493384 bibleblack4-1.wmv
kyz@furnace:~$


kur0shin.org -- it certainly is

Godwin's law [...] is impossible to violate except with an infinitely long thread that doesn't mention nazis.
[ Parent ]

ah-ha! (none / 0) (#28)
by llimllib on Mon Jul 28th, 2003 at 10:55:41 AM EST
(llimllib at f2o .. org)

red hat 9 only has version 4.5.3. I have an old communist version of du.


Peace.
[ Parent ]
heh (5.00 / 1) (#15)
by j00z m4573r on Mon Jul 28th, 2003 at 10:28:21 AM EST
(j00zm4573r @ j00zm0mz dot c0m) http://m4573r.dnsalias.net/free/

Maybe I should read.. it's still early though.

Does --aparent-size work right?

Free shell access!
[ Parent ]

ok, I appear to be thinking of an old version (none / 0) (#19)
by llimllib on Mon Jul 28th, 2003 at 10:35:18 AM EST
(llimllib at f2o .. org)

I seem to be thinking of an old version of du. Mine now does not recognize the --apparent-size option, so it appears they've removed it, or RH has included a changed version of du. I did reinstall just a few days ago, and I remembered the man page from memory. Reading the new one, I didn't assimilate that they'd changed it, even though I read it.


Peace.
[ Parent ]
also... (5.00 / 1) (#17)
by j00z m4573r on Mon Jul 28th, 2003 at 10:31:51 AM EST
(j00zm4573r @ j00zm0mz dot c0m) http://m4573r.dnsalias.net/free/

My copy of du (Recent build of Gentoo) doesn't have --aparent-size

Free shell access!
[ Parent ]

try (5.00 / 1) (#20)
by danni on Mon Jul 28th, 2003 at 10:35:39 AM EST
(danni_k5 at hotmail dot com) likes cute fluffy things

--block-size=1 ?

[ Parent ]
still outputs 4096 (none / 0) (#25)
by llimllib on Mon Jul 28th, 2003 at 10:49:54 AM EST
(llimllib at f2o .. org)

but I guess that's okay. I was reading the man page for my du, but not really reading that it is now significantly different from my old version, which I had used extensively. I guess it's no longer possible to get apparent size from du.


Peace.
[ Parent ]
Here's the correct behavior for DU (4.80 / 5) (#5)
by DesiredUsername on Mon Jul 28th, 2003 at 10:18:20 AM EST
(physics_seeker@yahoo.com)

"Please email me this that neural networks in Go thing."

Play 囲碁
ummmm (none / 0) (#10)
by llimllib on Mon Jul 28th, 2003 at 10:23:08 AM EST
(llimllib at f2o .. org)

well, I'd rather finish it first. It's a preliminary report on my summer research which is transitioning into my fall research. Basically, it says "I'm not done yet but here's what I want to do". For actual cool stuff about NNs in Go that is currently inspiring me, I recommend this paper. It's really well done, and basically I spent my whole summer trying to understand it.


Peace.
[ Parent ]
ANNs in games (5.00 / 2) (#18)
by gazbo on Mon Jul 28th, 2003 at 10:32:00 AM EST
(happy [underscore] sacks@hotmail.com) http://www.gaz.nildram.co.uk

I can't be arsed to download let alone read the paper, but I'm going to comment anyway, and misunderstandings be damned!

I guess Go is probably an ideal game (or at least as ideal as one would get in a non-artificial, non-trivial game) for ANNs, as games which are heavy on the rules, such as chess, are just so not suited. Although I don't play Go, it seems that there are very few rules indeed as far as stone placement goes, so it may stand much more of a chance.

Couple of things, though:

  • How do they ensure that the ANN plays a valid move? It's easy to detect if it tries to play one, but then how does one decide what move it should play instead?
  • How does one go about training it? Train it using a conventional computer program? Genetic algorithms in a tournament?

-----
Topless, revealing, nude pics and vids of Zora Suleman! Upskirt and down blouse! Cleavage!
Hardcore ZORA SULEMAN pics!

[ Parent ]

Answers (5.00 / 1) (#24)
by llimllib on Mon Jul 28th, 2003 at 10:45:51 AM EST
(llimllib at f2o .. org)

the ANN doesn't really "play" any sort of move. Instead, it receives a move as input and outputs a value which, ideally, represents the value of said move. Therefore, as long as you don't feed it an illegal move, the network will "play" whatever move it rates the highest. It wouldn't make sense to waste time having the ANN evaluate illegal moves.

There are two dominant training methods (AFAIK).

1) TD(0) learning. Basically, the network plays itself thousands upon thousands of times, or plays another opponent. This is the approach the NeuroGo by Markus Enzenberger uses to be the most successful current NN Go program.

2) Move-Pair analysis, studied in the paper I referenced. To train the network, a large database of expert games is collected. Say we know that at move 254 of a particular game, the expert plays t15. We then feed t15 and various features of the board at t15 into the game, as well as various features of the board at a point near t15 (the random move). Then, if the network outputs a significantly higher value for the expert move than the random move, the error is 0. Else, calculate an appropriate error and propagate it through the network. Eventually, we should be able to pick the expert move over the random move in most cases. In van der Werf's paper, he gets to about 90% at predicting the expert move over the random one.

Peace.
[ Parent ]
Nope. (5.00 / 3) (#4)
by gordonjcp on Mon Jul 28th, 2003 at 10:17:04 AM EST
(gNoOrSdPoAnM@gjcp.net) http://www.gjcp.net

ls is reporting the file size, du is reporting the total size of blocks used. If you're using 4k allocation blocks, then du will show how many *whole 4k blocks* have been used. ls, on the other hand, simply sums up the actual length of the files.

How I need a drink, alcoholic in nature, after the heavy lectures involving quantum mechanics!


my spammed response: (none / 0) (#13)
by llimllib on Mon Jul 28th, 2003 at 10:27:20 AM EST
(llimllib at f2o .. org)

-b, --bytes equivalent to `--apparent-size --block-size=1' shouldn't I get apparent size, as shown in it_certainly_is' comment?

Peace.
[ Parent ]
Short answer... (5.00 / 2) (#29)
by gordonjcp on Mon Jul 28th, 2003 at 12:15:47 PM EST
(gNoOrSdPoAnM@gjcp.net) http://www.gjcp.net

Don't know. It might be implementation-dependant.

How I need a drink, alcoholic in nature, after the heavy lectures involving quantum mechanics!


[ Parent ]
Maybe (5.00 / 3) (#3)
by danni on Mon Jul 28th, 2003 at 10:16:48 AM EST
(danni_k5 at hotmail dot com) likes cute fluffy things

ls gives the size of the file and du gives the amount of disc space actually used by the file?

I'd imagine (5.00 / 4) (#2)
by gazbo on Mon Jul 28th, 2003 at 10:16:30 AM EST
(happy [underscore] sacks@hotmail.com) http://www.gaz.nildram.co.uk

That as du is supposed to be for finding disk usage information, it is telling you how much space is used on the disk, rather than how big the file is (yes they're different due to blocks etc). Just like in Windows if you right-click a file and select properties, it gives you two numbers for "Size" and "Size on disk".

That's just a guess, but I don't think it's far off the mark.

-----
Topless, revealing, nude pics and vids of Zora Suleman! Upskirt and down blouse! Cleavage!
Hardcore ZORA SULEMAN pics!

RTFM (3.66 / 3) (#1)
by Dirty Sanchez on Mon Jul 28th, 2003 at 10:16:10 AM EST
(CMF Tax Compliance Officer) http://www.lemonparty.org

damnit.

TMIPAAISDUSDSD (none / 0) (#14)
by llimllib on Mon Jul 28th, 2003 at 10:28:18 AM EST
(llimllib at f2o .. org)

The Man Is Posted Above And It Says DU Should Do Something Different


Peace.
[ Parent ]
ever consider (5.00 / 1) (#32)
by Dirty Sanchez on Mon Jul 28th, 2003 at 12:38:38 PM EST
(CMF Tax Compliance Officer) http://www.lemonparty.org

the possibility that the files has holes in them, or that your disks are fragmented?

[ Parent ]
wrong on both counts (none / 0) (#33)
by llimllib on Mon Jul 28th, 2003 at 02:05:07 PM EST
(llimllib at f2o .. org)

thanks for trying to help, though. My version of du changed when I reinstalled and I didn't notice.


Peace.
[ Parent ]
Lounix Geeks Only!!! | 35 comments (35 topical, 0 editorial, 0 hidden)
View: Display: Sort:

kuro5hin.org

[XML]
All trademarks and copyrights on this page are owned by their respective companies. The Rest © 2000 - 2003 Kuro5hin.org Inc.
See our legalese page for copyright policies. Please also read our Privacy Policy.
Kuro5hin.org is powered by Free Software, including Apache, Perl, and Linux, The Scoop Engine that runs this site is freely available, under the terms of the GPL.
Need some help? Email help@kuro5hin.org.
Erik Benson is a deadbeat.

Powered by Scoop create account | help/FAQ | mission | links | search | IRC | YOU choose the stories! K5 Store by Jinx Hackwear Syndication Supported by NewsIsFree