---------- Forwarded Message ---------- Subject: Re: [SLE] File size Date: Sat, 27 Nov 1999 21:09:55 -0500 From: Tim Shann <tajc@goes.com> On Sat, 27 Nov 1999, you wrote:
Hi,
No, that has nothing to do with the kernel. If someone wrote a C program (like du) and wanted to get the size of a file he'd use the stat funtion. It returns, among other info, the file size in bytes. It's up to author to convert it to KB or MB and to choose the default.
Ok. Glad I learned something. I bought a book last year to learn C in windows but even the simple "Hello world" wouldn't work. I guess the compiler is junk. Just yesterday I began "Beggining Linux Programming". "Hello World" worked first time. It sure is nice to be able to use a compiler that works. Trying out scripts right in bash is a real plus too. Now I can finally make some progress.
I don't know why bytes where chosen to be the default in du, maybe because it can then easier be used in scripts. It would be somewhat more difficult, if the size was given in MB or KB depending on the size of the file. Anyway if you don't like it, you can easily change it like this
alias du='du -h'
(add this to your ~/.bashrc) That's something you can't do in Windows :-)
Ciao, Stefan
Great! I'll try that now. There's an awful lot of things that can't be done in Windows that can be done "here". Thanks again, Tim, NJ -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
On Sat, 27 Nov 1999, Tim Shann wrote:
---------- Forwarded Message ---------- Subject: Re: [SLE] File size Date: Sat, 27 Nov 1999 21:09:55 -0500 From: Tim Shann <tajc@goes.com>
On Sat, 27 Nov 1999, you wrote:
Hi,
No, that has nothing to do with the kernel. If someone wrote a C program (like du) and wanted to get the size of a file he'd use the stat funtion. It returns, among other info, the file size in bytes. It's up to author to convert it to KB or MB and to choose the default.
Ok. Glad I learned something. I bought a book last year to learn C in windows but even the simple "Hello world" wouldn't work. I guess the compiler is junk. I gave up in disgust. Just yesterday I began "Beggining Linux Programming". "Hello World" worked first time. It sure is nice to be able to use a compiler ( gcc ) that works. Trying out scripts right in bash is a real plus too. Now I can finally make some progress.
I don't know why bytes where chosen to be the default in du, maybe because it can then easier be used in scripts. It would be somewhat more difficult, if the size was given in MB or KB depending on the size of the file. Anyway if you don't like it, you can easily change it like this
alias du='du -h'
(add this to your ~/.bashrc) That's something you can't do in Windows :-)
Ciao, Stefan
Great! I'll try that now. There's an awful lot of things that can't be done in Windows that can be done "here". Thanks again, Tim, NJ -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
participants (1)
-
tajc@goes.com