|
Prev: shell help again
Next: Recommend a Linux for me?
From: George on 17 Apr 2008 11:47 any command to get the file size of a file e.g. abc.dat? thanks
From: pk on 17 Apr 2008 12:19 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 17 Apr 2008 13:06 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 17 Apr 2008 16:20 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 18 Apr 2008 20:25
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 |