Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users


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.

Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 07-24-2006
Registered User
 
Join Date: Jun 2006
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
Registered User
 
Join Date: Oct 2005
Location: Chennai
Posts: 370
Thanks: 0
Thanked 4 Times in 4 Posts
ls

Did you try
Code:
'ls -l'

Sponsored Links
    #3  
Old 07-24-2006
tayyabq8's Avatar
Ex-Moderator
 
Join Date: Nov 2004
Location: Bahrain
Posts: 592
Thanks: 3
Thanked 6 Times in 3 Posts
To get filename and its size only:
Code:
ls -la | awk '{print $9, "\t", $5}'

    #4  
Old 07-24-2006
Registered User
 
Join Date: May 2006
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
Registered User
 
Join Date: Jun 2006
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
Registered User
 
Join Date: Nov 2008
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 02:44 PM.