• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Identifying sparse files using getattrlist()
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Identifying sparse files using getattrlist()


  • Subject: Identifying sparse files using getattrlist()
  • From: rohan a <email@hidden>
  • Date: Mon, 2 Nov 2009 19:07:56 +0530

Hello All,

I am trying to identify if a particular file is a sparse file using
getattrlist()

I am using this :     attrList.fileattr    = ATTR_FILE_TOTALSIZE |
ATTR_FILE_ALLOCSIZE;

According to the man page if  ATTR_FILE_ALLOCSIZE <
ATTR_FILE_TOTALSIZE the file is a sparse file.

I created the sparse file using dd
#dd if=/dev/zero of=sparse-file bs=1 count=0 seek=3g

However, both AllocSize and TotalSize are returning the same size
while actually AllocSize < TotalSize

I am using UFS

Thanks,
Rohan
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Identifying sparse files using getattrlist()
      • From: Alastair Houghton <email@hidden>
    • Re: Identifying sparse files using getattrlist()
      • From: rohan a <email@hidden>
  • Prev by Date: Re: not seeing dynamic library page-ins
  • Next by Date: IPFW forwarding on SnowLeopard
  • Previous by thread: Re: not seeing dynamic library page-ins
  • Next by thread: Re: Identifying sparse files using getattrlist()
  • Index(es):
    • Date
    • Thread