From: George on
any command to get the file size of a file e.g. abc.dat?

thanks
From: pk on
On Thursday 17 April 2008 17:47, George wrote:

> any command to get the file size of a file e.g. abc.dat?

ls?

From: Bit Twister on
On Thu, 17 Apr 2008 23:47:22 +0800, George wrote:
> any command to get the file size of a file e.g. abc.dat?

Based on all the information provided,
ls or stat

Now if wanting something else you will have to provide which language
you are programming with.

From: Chris F.A. Johnson on
On 2008-04-17, George wrote:
> any command to get the file size of a file e.g. abc.dat?

On Linux (i.e., using GNU stat):

size=$( stat -c %s FILE )

More generally:

size=$( wc -c < FILE )


--
Chris F.A. Johnson, author | <http://cfaj.freeshell.org>
Shell Scripting Recipes: | My code in this post, if any,
A Problem-Solution Approach | is released under the
2005, Apress | GNU General Public Licence
From: Andrea Francia on
pk wrote:
> On Thursday 17 April 2008 17:47, George wrote:
>
>> any command to get the file size of a file e.g. abc.dat?
>
> ls?
>
ls -l

--
Andrea Francia
alias rm='trash' #use trash command instead of removing
rm -Rfv file #put the file in the KDE trashcan
http://www.andreafrancia.it/trash
 |  Next  |  Last
Pages: 1 2
Prev: shell help again
Next: Recommend a Linux for me?