| OpSys Spring 2005 - HW2 FAQ |
|   OpSys Home   |   HW2 Assignment |
+ Calling stat()
|
Question: | Is there any sample code that shows how to call stat? |
|
Answer: | Yes - there is a sample program here |
+ Sample Windows code?
|
Question: | Is there any sample Windows code that might be worth looking at? |
|
Answer: | Yes, here is some code that lists the files in a directory: Sample Windows code |
+ stat() vs. lstat()
|
Question: | Should we be using |
|
Answer: | For a symbolic link (which is like a "shortcut" for Windows folks),
|
+ BSD du command and "-B 1"
|
Question: | The command line shown in the assignment that we can use to find the "right" diskusage
using the |
|
Answer: | No, it doesn't... (The command line in the assignment works under Linux, but BSD does not support the "-B" flag to du.). So - you need to multiply the output of du (which tells about the number of 512 byte blocks), by 512 to get the numbers you should be generating.
|