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
find file size greater than 1 GB ali560045 Shell Programming and Scripting 11 01-08-2009 10:16 AM
find lines have 2nd colum value greater than 40 devesh123 Shell Programming and Scripting 5 10-01-2008 08:07 AM
Finding files with names that have a real number greater then difined. harmonwood Shell Programming and Scripting 2 11-09-2007 10:28 AM
find - finding files. gsjf Shell Programming and Scripting 3 09-04-2002 02:14 PM
How can I automatically find important files??? TRUEST UNIX for Dummies Questions & Answers 4 04-18-2002 11:15 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 03-16-2009
manoj_dahiya22 manoj_dahiya22 is offline
Registered User
  
 

Join Date: Mar 2009
Posts: 23
Important finding --- find files greater than 1 MB

as we can find file greater than 1 MB with find command as:

find /dir -name '*' -size +1M
find /dir/* -name '*' -size +1M

but wats its doing is , its finding files only in current directory not in sub-directories. i want files from sub-directories too.

Please help... Thanx in advance...!!!!
  #2 (permalink)  
Old 03-16-2009
vidyadhar85's Avatar
vidyadhar85 vidyadhar85 is offline Forum Staff  
Moderator(The Tutor)
  
 

Join Date: Jun 2008
Location: INDIA
Posts: 1,390
Quote:
Originally Posted by manoj_dahiya22 View Post
as we can find file greater than 1 MB with find command as:

find /dir -name '*' -size +1M
find /dir/* -name '*' -size +1M

but wats its doing is , its finding files only in current directory not in sub-directories. i want files from sub-directories too.

Please help... Thanx in advance...!!!!
try either
Code:
 
find . -size +1M
find ./dir -size +1M
  #3 (permalink)  
Old 03-17-2009
manoj_dahiya22 manoj_dahiya22 is offline
Registered User
  
 

Join Date: Mar 2009
Posts: 23
Thanx Vidyadhar85

but its producing same result....!
please let me know the solution if you find any ..... because its reuired in my project . i need to send details of files greate than 1 MB

Thanks agaain
  #4 (permalink)  
Old 03-18-2009
wabard wabard is offline
Registered User
  
 

Join Date: Mar 2009
Location: Adelaide, SA & Perth, WA - Australia
Posts: 25
By default, the find command parses through sub-directories. What O/S Flavor are you on?


for example...

find . -print

will return a complete file listing for everything from the current directory down...

Note that not all U**X Flavor support the human readable size nomenclature. Try +1000k instead. All find command support sizes of b,c,w and k.
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 11:05 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