home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / unix / question / 14843 < prev    next >
Encoding:
Text File  |  1992-12-21  |  1.1 KB  |  30 lines

  1. Newsgroups: comp.unix.questions
  2. Path: sparky!uunet!ferkel.ucsb.edu!taco!rock!stanford.edu!ames!pacbell.com!UB.com!quack!dfox
  3. From: dfox@quack.sac.ca.us (David Fox)
  4. Subject: Re: Cylinder Groups and Data Blocks
  5. Message-ID: <fWSotBD@quack.sac.ca.us>
  6. Organization: The Duck Pond public unix: +1 408 249 9630, log in as 'guest'.
  7. References: <1gtunnINNgk0@menudo.uh.edu>
  8. Date: 20 Dec 1992 18:26:51 UTC
  9. Lines: 19
  10.  
  11. In article <1gtunnINNgk0@menudo.uh.edu> cavers@menudo.uh.edu (Chris M. Cavers) writes:
  12. >I am trying to obtain a 'map' or list of all of the data areas on a disk
  13. >under sun os 4.1.2.
  14. >Can someone tell me how to do this?
  15. >I've been using the following code to try to do this:
  16.  
  17. [code deleted]
  18.  
  19. >Assuming each block is one sector (512 bytes) the above code 
  20. >comes to about half of the number of bytes on the disk (as given by the
  21. >df command).
  22. >
  23. >What is wrong?
  24.  
  25. The clue is " comes to about half of the number of bytes on the disk".  
  26. df outputs information in terms of 512 byte blocks, and not in kilo-
  27. bytes unless you use the -k flag.  Try using the -k flag with df and
  28. comparing that to the results your program gives.
  29.  
  30.