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
problem in filtering the file adityam UNIX for Dummies Questions & Answers 0 11-22-2007 07:37 AM
Help, filtering some info. from a file under "()" varungupta UNIX for Advanced & Expert Users 10 09-11-2007 07:59 AM
command to find out total size of a specific file size (spread over the server) abhinov SUN Solaris 3 08-08-2007 07:48 AM
Filtering multiple entries in a file suman_jakkula Shell Programming and Scripting 2 08-22-2006 06:02 AM
Urgent: Filtering a File HItesh Shell Programming and Scripting 5 05-11-2006 05:16 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 01-17-2002
nir nir is offline
Registered User
  
 

Join Date: Jan 2002
Posts: 1
filtering by file size

Hi !

I wanted to know how can i filter files by "size range".
like : getting all the files that are bigger than 100 byte and smaller than 200 byte ?

I want to make it as a script...

I noticed the unix command : find . -size +100c
but i also want limit it's upper bounds.
so something like :
find . -size +100c -200c
or
find . -size +100c && -200c

doesn't work...
What can i do ?

i also tried to use the "size" command on a file , but it doesn't return one value (the size in bytes).

w8ing 4 your answers...
  #2 (permalink)  
Old 01-17-2002
Jimbo
Guest
  
 

Posts: n/a
Bits: 0 [Banking]
The -a allows you to specify multiple primaries:

find . -size +100c -a -size -200c -exec ls -ld {} \;

but on HP-UX, it works without the -a also:
  #3 (permalink)  
Old 01-17-2002
Neo's Avatar
Neo Neo is offline Forum Staff  
Administrator
  
 

Join Date: Sep 2000
Location: Asia Pacific
Posts: 6,712
from the find man page ....

Quote:
expr1 -a expr2
Same as expr1 expr2.

expr1 -and expr2
Same as expr1 expr2.

expr1 -o expr2
Or; expr2 is not evaluated if expr1 is true.

expr1 -or expr2
Same as expr1 -o expr2.

expr1 , expr2
List; both expr1 and expr2 are always evaluated.
The value of expr1 is discarded; the value of the
list is the value of expr2.
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 09:04 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