Operating System - HP-UX
1752786 Members
5969 Online
108789 Solutions
New Discussion юеВ

Re: Easy points for all...

 
SOLVED
Go to solution

Easy points for all...

Hi. All!

Excuse me but I can't "find"
files with some size.:(
I type below:
#find . -size c1000000
and get:
./.dt/sessions/current/dt.session
./.dt/Trash/files.err
./.dt/.Printers/Hardcopy_Print
./.dt/.Printers/Line_Print
./.dt/.Printers/List_Print
./.dt/.Printers/OnlineB_Print
./.dt/.Printers/Postscript_Print
./.dt/.Printers/Printer1_Print
./.dt/.Printers/Printer2_Print

Where is a mistake?
(I need to find files with some size)
Thanx in advance. Oleg
12 REPLIES 12
Paula J Frazer-Campbell
Honored Contributor

Re: Easy points for all...

HI

find . -size +1000000c -exec ls -l {} \;

Will do it.
Change size to suit.


Paula
If you can spell SysAdmin then you is one - anon
Robin Wakefield
Honored Contributor
Solution

Re: Easy points for all...

Hi Oleg,

Nearly correct:

find . -size +1000000c | xargs ll -d

Rgds, Robin.
Michael Tully
Honored Contributor

Re: Easy points for all...

Hi Oleg,

try this:

find . -size +1000000c | xargs ll

HTH
-Michael
Anyone for a Mutiny ?

Re: Easy points for all...

Hi!
Sorri but in case:
#find . -size +1000000c -exec ls -l {} \;
I got nothing. :(

In case:
#find . -size +1000000c | xargs ll
I got list of files of folder with sizes. Size - any.

Whats up?

Thanx.Oleg


Re: Easy points for all...

Hi!
Sorri but in case:
#find . -size +1000000c -exec ls -l {} \;
I got nothing. :(

In case:
#find . -size +1000000c | xargs ll
I got list of files of folder with sizes. Size - any.

Whats up?

Thanx.Oleg
P.S. Sorry what in "databases"...


Robin Wakefield
Honored Contributor

Re: Easy points for all...

Hi Oleg,

This indicates that you have no files greater than 1000000 bytes within your current directory.

Don't forget to use "xargs ll -d", NOT "xargs ll". Try reducing the number down if you want to see some output.

find . -size +500000c | xargs ll -d

Rgds, Robin
Andreas Voss
Honored Contributor

Re: Easy points for all...

Hi,

when you do:

find . -size +1000000
it searches for files greater then 1000000 Bytes (1MB)
If you only whant to list files not dirs use:
find . -type f -size +1000000c

Regards

Re: Easy points for all...

Hi!
It is a shame to me...
I has mixed "/- root folder" - and ". - current folder" and I found files with sizes >1 Mb where isnt.
Excuse me. ITS WORK!!
Thanx all.
But I'm interesting - what to do command:
find . -size +1000000c -exec ls -l {} \;

Oleg.
Santosh Nair_1
Honored Contributor

Re: Easy points for all...

Not sure what you're asking...if you're asking what this command does, then, the find portion finds files starting in the present directory (.) that is larger than 1000000 characters (size +1000000c) and then executes the ls -l command on these files (-exec ls -l {}). I would also check to see if this is a file (-type f).

-Santosh
Life is what's happening while you're busy making other plans