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 > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
sort files by date, delete oldest, if total size bigger than scarfake Shell Programming and Scripting 2 05-21-2008 08:02 AM
Help with finding files bbbngowc Shell Programming and Scripting 1 12-10-2007 07:36 PM
finding duplicate files by size and finding pattern matching and its count jerome Sukumar Shell Programming and Scripting 2 12-01-2006 04:20 AM
How to tar a files that bigger than 2 gig in AIX 5.2? owangecounty AIX 6 06-14-2006 06:01 AM
Finding files with UTF-8 BOM kotoponus UNIX for Dummies Questions & Answers 0 05-20-2005 09:28 AM

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 12-20-2006
melanie_pfefer melanie_pfefer is offline
Registered User
  
 

Join Date: Nov 2006
Posts: 234
finding files bigger than 2G

find /base/directory -size +2048M > /tmp/tempfile


1] is there an option to specify the size in Gb
2] the output lists files with size such as:
1152157

(doing ls -l so I guess it is in bytes) So I am missing something here because this file has a size below 2 Gb.

Any hints??

thx.
  #2 (permalink)  
Old 12-20-2006
aju_kup aju_kup is offline
Registered User
  
 

Join Date: Jul 2006
Posts: 189
ls -l | awk '{ s= $5/1073741824; if(s >= 2){print $0} }'

Last edited by aju_kup; 12-20-2006 at 05:01 AM..
  #3 (permalink)  
Old 12-20-2006
tayyabq8's Avatar
tayyabq8 tayyabq8 is offline Forum Advisor  
Moderator
  
 

Join Date: Nov 2004
Location: Bahrain
Posts: 579
What is 3072?
  #4 (permalink)  
Old 12-20-2006
ghostdog74 ghostdog74 is offline Forum Advisor  
Registered User
  
 

Join Date: Sep 2006
Posts: 2,522
Quote:
Originally Posted by melanie_pfefer
find /base/directory -size +2048M > /tmp/tempfile


1] is there an option to specify the size in Gb
2] the output lists files with size such as:
1152157

(doing ls -l so I guess it is in bytes) So I am missing something here because this file has a size below 2 Gb.

Any hints??

thx.
please see the man page of your find command and see if there is -size n[cwbkMG] option.
My version of find can specify -size in Gb, as stated in my man page.
Closed Thread

Bookmarks

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 10:30 PM.


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