The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
how to List out the Files based on the file Size...? psiva_arul Shell Programming and Scripting 6 04-08-2008 10:06 PM
Total file size of a subset list tekster757 UNIX for Dummies Questions & Answers 3 03-21-2008 01:27 PM
command to list file size rgordon HP-UX 3 12-05-2007 05:43 AM
Files list which are more than 300 MB size redlotus72 UNIX for Dummies Questions & Answers 2 09-14-2006 12:28 AM
list file's by size order in sepecfied directory and sub directories ferretman UNIX for Dummies Questions & Answers 2 01-03-2002 07:55 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 06-12-2007
komputersman komputersman is offline
Registered User
  
 

Join Date: Jun 2007
Posts: 46
List File size

Hello all,
I have a directory filling up. I need to determine the size of the files in the directory. How do I do that, what command should I run when I am in the directory?

Next question, can I expand the partition size?
  #2 (permalink)  
Old 06-12-2007
solfreak's Avatar
solfreak solfreak is offline
Registered User
  
 

Join Date: Jun 2007
Posts: 35
du -k -a | sort -n

Or

find . -type f | xargs du -k | sort -n
  #3 (permalink)  
Old 06-12-2007
porter porter is offline Forum Advisor  
Registered User
  
 

Join Date: Jan 2007
Posts: 2,965
Quote:
Originally Posted by komputersman
Next question, can I expand the partition size?
What platform are you on?

What is your filesystem?

Do you have unallocated disk space?
  #4 (permalink)  
Old 06-12-2007
komputersman komputersman is offline
Registered User
  
 

Join Date: Jun 2007
Posts: 46
Sorry, Solaris 8.

And I am not positive about unallocated disk space yet. I am taking over for someone that put this server together and I am unsure the configuration.
  #5 (permalink)  
Old 06-12-2007
solfreak's Avatar
solfreak solfreak is offline
Registered User
  
 

Join Date: Jun 2007
Posts: 35
Well, there is growfs(1M) but whether you can use it or not depends on your disk layout. Actually, I don't know if growfs is even available on Solaris 8
  #6 (permalink)  
Old 06-13-2007
craigp84 craigp84 is offline
Registered User
  
 

Join Date: May 2007
Location: Glasgow, Scotland
Posts: 59
Quote:
Originally Posted by komputersman
Hello all,
I have a directory filling up. I need to determine the size of the files in the directory. How do I do that, what command should I run when I am in the directory?
List files from smallest to largest:
Code:
ls -l /path/to/dir | sort -nk5
Linux:
Code:
du -csh /path/to/dir/*
More General:
Code:
du -sk /path/to/dir/*
To clean up, you'll probably use find, maybe something like -
Code:
find /path/to/dir -type f -mtime +31 -exec rm -f {} \; -ls
find /path/to/dir -type f -mtime +10 -exec gzip -f {} \; -ls
  #7 (permalink)  
Old 06-13-2007
solfreak's Avatar
solfreak solfreak is offline
Registered User
  
 

Join Date: Jun 2007
Posts: 35
komputersman,

I found this sticky on this forum, think you might find it useful:
http://unix.com/showthread.php?t=25840
Closed Thread

Bookmarks

Tags
linux, mtime

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 07:05 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0