Why you don't try to use stat

for example

stat ZoZ.vdi | awk '/Blocks/ {print $4 * $7}'

stat ZoZ.vdi
  File: `ZoZ.vdi'
  Size: 16796172800    Blocks: 32805040   IO Block: 4096   regular file
Device: 804h/2052d    Inode: 1315583     Links: 1
Access: (0600/-rw-------)  Uid: ( 1001/xxxxx)   Gid: ( 1001/xxxxx)
Access: 2012-01-04 09:08:12.259787395 +0100
Modify: 2012-01-04 09:18:41.071801941 +0100
Change: 2012-01-04 09:18:41.071801941 +0100


2012/1/4 Srija <swap_proj...@yahoo.com>

> Hi,
>
> If the  file contains the sparse  bits then can anybody guide me , how to
> remove those ?  For example
> when I am checking file.img [ as below] , it's size is 38G.  Basically
> it's size is 93G because of the sparse.
>
> [root@server]# du -sh file.img
> 38G     file.img
> [root@server]# du -sh --apparent-size file.img
> 93G     file.img
>
> I need the 'du -sh'  and 'du-sh --apprent-size ' should be  same  and ie,
> 38G.
>
> Help is really appreciate.
>
> Thanks in advance...
>
> _______________________________________________
> rhelv5-list mailing list
> rhelv5-list@redhat.com
> https://www.redhat.com/mailman/listinfo/rhelv5-list
>
>


-- 
esta es mi vida e me la vivo hasta que dios quiera
_______________________________________________
rhelv5-list mailing list
rhelv5-list@redhat.com
https://www.redhat.com/mailman/listinfo/rhelv5-list

Reply via email to