sh script code to get file size.

2013-01-18 Thread Fbsd8
In a script in am working on I need to find out the allocated size of a sparse file. The only command that comes to mind is ls -lh The du -h command is not appropriate because it will show the occupied size and not the allocated size. I don't know how to parse out to the position in the output

Re: sh script code to get file size.

2013-01-18 Thread Dan Nelson
In the last episode (Jan 18), Fbsd8 said: In a script in am working on I need to find out the allocated size of a sparse file. The only command that comes to mind is ls -lh The du -h command is not appropriate because it will show the occupied size and not the allocated size. I don't know

Re: sh script code to get file size.

2013-01-18 Thread Vincent Hoffman
On 18/01/2013 23:26, Fbsd8 wrote: In a script in am working on I need to find out the allocated size of a sparse file. The only command that comes to mind is ls -lh The du -h command is not appropriate because it will show the occupied size and not the allocated size. I don't know how to

Re: sh script code to get file size.

2013-01-18 Thread Fbsd8
In a script in am working on I need to find out the allocated size of a sparse file. The only command that comes to mind is ls -lh The du -h command is not appropriate because it will show the occupied size and not the allocated size. I don't know how to parse out to the position in the

Re: sh script code to get file size.

2013-01-18 Thread Fbsd8
Chris Hill wrote: On Fri, 18 Jan 2013, Fbsd8 wrote: In a script in am working on I need to find out the allocated size of a sparse file. The only command that comes to mind is ls -lh The du -h command is not appropriate because it will show the occupied size and not the allocated size. I

Re: sh script code to get file size.

2013-01-18 Thread Chris Hill
On Fri, 18 Jan 2013, Fbsd8 wrote: In a script in am working on I need to find out the allocated size of a sparse file. The only command that comes to mind is ls -lh The du -h command is not appropriate because it will show the occupied size and not the allocated size. I don't know how to parse

Re: sh script code to get file size.

2013-01-18 Thread Robert Bonomi
From owner-freebsd-questi...@freebsd.org Fri Jan 18 17:30:31 2013 Date: Fri, 18 Jan 2013 18:26:54 -0500 From: Fbsd8 fb...@a1poweruser.com To: FreeBSD questions questi...@freebsd.org Subject: sh script code to get file size. In a script in am working on I need to find out the allocated