how to find the file size in unix | Unix Linux Forums | UNIX for Advanced & Expert Users

  Go Back    


UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

how to find the file size in unix

UNIX for Advanced & Expert Users


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 07-24-2006
lmraochodisetti lmraochodisetti is offline
Registered User
 
Join Date: Jun 2006
Last Activity: 29 July 2006, 3:21 AM EDT
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Question how to find the file size in unix

Anybody can help

HOW TO FIND THE FILE SIZE IN UNIX

Last edited by lmraochodisetti; 07-24-2006 at 03:15 AM..
Sponsored Links
    #2  
Old 07-24-2006
ranj@chn ranj@chn is offline Forum Advisor  
Registered User
 
Join Date: Oct 2005
Last Activity: 25 August 2011, 2:35 AM EDT
Location: Chennai
Posts: 370
Thanks: 0
Thanked 5 Times in 4 Posts
ls

Did you try
Code:
'ls -l'

Sponsored Links
    #3  
Old 07-24-2006
tayyabq8's Avatar
tayyabq8 tayyabq8 is offline Forum Advisor  
Ex-Moderator
 
Join Date: Nov 2004
Last Activity: 16 December 2013, 12:55 AM EST
Location: Bahrain
Posts: 592
Thanks: 3
Thanked 8 Times in 3 Posts
To get filename and its size only:
Code:
ls -la | awk '{print $9, "\t", $5}'

    #4  
Old 07-24-2006
rajlucky_raj rajlucky_raj is offline
Registered User
 
Join Date: May 2006
Last Activity: 22 September 2006, 4:43 AM EDT
Location: INDIA
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
You Can use
du -k filename
Sponsored Links
    #5  
Old 07-24-2006
lmraochodisetti lmraochodisetti is offline
Registered User
 
Join Date: Jun 2006
Last Activity: 29 July 2006, 3:21 AM EDT
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Thanks to all

Thanking you to all who have given reply to my faq.
Sponsored Links
    #6  
Old 12-16-2008
cmaroju cmaroju is offline
Registered User
 
Join Date: Nov 2008
Last Activity: 13 July 2012, 7:12 AM EDT
Posts: 24
Thanks: 1
Thanked 0 Times in 0 Posts
ls -ltrS



will display all the files based on their size in a particular directory in reverse order.
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
find with file size and show the size rpraharaj84 Shell Programming and Scripting 3 10-06-2009 01:42 PM
Command/script to find size of Unix Box ? sakthifire Shell Programming and Scripting 6 06-18-2008 02:07 AM
How to find size of a file kittusri9 Shell Programming and Scripting 4 04-28-2008 08:01 AM
unix script to check whether particular file exists and to find its size Balachandar Shell Programming and Scripting 9 02-05-2008 02:56 AM
command to find out total size of a specific file size (spread over the server) abhinov Solaris 3 08-08-2007 06:48 AM



All times are GMT -4. The time now is 07:49 PM.