Newbie Q!

Newbie Q!

Post by Stati » Sun, 03 Jan 1999 04:00:00



Hello,

How do I find all the files lets say with name "s*.*" in my current
directory
that are bigger than 256b but less than 1kb using find command?
I have something like this:
find . -name "s*.*" -print
; which will print all the file names that satisy "s*.*" mask regardless of
the size
The -size option is to specify _exact_  size of the needed file, yet
mine are in the range >256b  and <1 k?

Any ideas would be really appreaciated.

 
 
 

Newbie Q!

Post by Barry Margoli » Sun, 03 Jan 1999 04:00:00



>The -size option is to specify _exact_  size of the needed file, yet
>mine are in the range >256b  and <1 k?

That's not true.  Here's what the find(1) man page says:

     In  the  descriptions, wherever n is used as a primary argu-
     ment, it will be interpreted as a decimal integer optionally
     preceded by a plus (+) or minus (-) sign, as follows:

     +n             more than n
     n              exactly n
     -n              less than n.

So if you want more than 256K, use -size +256000c.

P.S. Even a newbie should be able to come up with a more descriptive
Subject line than "Newbie Q!".  See my modified Subject, for instance.

--

GTE Internetworking, Powered by BBN, Burlington, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Don't bother cc'ing followups to me.

 
 
 

Newbie Q!

Post by Constantine A. Sismanidi » Sun, 03 Jan 1999 04:00:00



>Hello,

>How do I find all the files lets say with name "s*.*" in my current
>directory
>that are bigger than 256b but less than 1kb using find command?
>I have something like this:
>find . -name "s*.*" -print
>; which will print all the file names that satisy "s*.*" mask regardless of
>the size
>The -size option is to specify _exact_  size of the needed file, yet
>mine are in the range >256b  and <1 k?

'find . -name s\*.\* \(-size +256 -a -size -1024 \) -print'.

    -size -<n> means size less than <n>,
    -size <n> means <n> exactly, and
    -size +<n> means size greater than <n>.

This will do what you want on Digital Unix or HP-UX, but in any case you may
want to do a 'man find' to see if the syntax for 'find' differs from this;
and remember, the man page may be somewhat cryptic!

Quote:>Any ideas would be really appreaciated.

 
 
 

Newbie Q!

Post by Nano Byt » Mon, 04 Jan 1999 04:00:00


did yopu try the simple find command... for example:
find . -name s*.*
that is telling it to find everything in that directory recursivly that
start with s

>Hello,

>How do I find all the files lets say with name "s*.*" in my current
>directory
>that are bigger than 256b but less than 1kb using find command?
>I have something like this:
>find . -name "s*.*" -print
>; which will print all the file names that satisy "s*.*" mask regardless of
>the size
>The -size option is to specify _exact_  size of the needed file, yet
>mine are in the range >256b  and <1 k?

>Any ideas would be really appreaciated.

 
 
 

Newbie Q!

Post by Stati » Tue, 05 Jan 1999 04:00:00



Quote:>did yopu try the simple find command... for example:
>find . -name s*.*
>that is telling it to find everything in that directory recursivly that
>start with s

Geez are there any admins here at all???

OF COURSE I ALREADY KNOW WHAT
find . -name "s*" -print
does!!!!

I need to know how to print only those "s*" files whos size is bigger than
256b but less than 1 k!!

Unix Admins HELLO??!!!

 
 
 

1. More Win95 --> Linux Newbie Qs

Thank you all for the responses!  I got PPP up and running today, now
all I have to do
is track down the Linux ver of Netscape.  Just one more question:  Does
anyone know how to get a "screen dump"?

I'm referring to something like Windows95 Alt-PrintScreen (which copies
the current window to the clipboard as a bitmap).

--
To think, that sigs were once a kludge...

2. "xyplex connection to a socket" problems

3. 3 newbie Qs on partitioning a hard disk

4. mgetty help please....

5. Newbie Qs: Kernel patching and ppp auto dialing for no (apparent) reason

6. Gevion Lite problems...

7. Newbie Qs & As

8. Fileutils and large directories

9. Newbie Qs

10. newbie qs: netstat -an explanation with ports

11. Newbie Qs on ipchains

12. newbie Qs

13. A few newbie Qs