LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 04-02-2008, 09:12 PM   #1
SBN
Member
 
Registered: Jul 2006
Distribution: UBUNTU, CentOS, FEDORA 8
Posts: 474

Rep: Reputation: 30
Find Techniques


Hey guys im trying to use find to search for files that belong to certain user which has a range of file size ex. 10k to 100k. Do you know how to make this possible...
 
Old 04-02-2008, 10:28 PM   #2
beadyallen
Member
 
Registered: Mar 2008
Location: UK
Distribution: Fedora, Gentoo
Posts: 209

Rep: Reputation: 36
It's all on the find man page, but the following will work:
Code:
find /dir/path -size +10k -size -100k -user <username>
An -and is implicitly implied. So the above looks for files that are more than 10k AND less than 100k AND owned by the user <username>.
 
Old 04-03-2008, 12:36 AM   #3
SBN
Member
 
Registered: Jul 2006
Distribution: UBUNTU, CentOS, FEDORA 8
Posts: 474

Original Poster
Rep: Reputation: 30
oh thank you ive been doing the same but it seems i did some mistake thank you...
 
Old 04-03-2008, 08:21 PM   #4
SBN
Member
 
Registered: Jul 2006
Distribution: UBUNTU, CentOS, FEDORA 8
Posts: 474

Original Poster
Rep: Reputation: 30
Hi this doesnt work, its like it wont work if there are 2 -size.
 
Old 04-03-2008, 08:38 PM   #5
beadyallen
Member
 
Registered: Mar 2008
Location: UK
Distribution: Fedora, Gentoo
Posts: 209

Rep: Reputation: 36
Strange, it works for me. What version of find are you using? Maybe your version needs '-and' between the arguments. Try:
Code:
find /dir/path -size +10k -and -size -and -100k -and -user <username>

Last edited by beadyallen; 04-05-2008 at 07:10 AM.
 
Old 04-04-2008, 09:56 AM   #6
frenchn00b
Senior Member
 
Registered: Jun 2007
Location: E.U., Mountains :-)
Distribution: Debian, Etch, the greatest
Posts: 2,561

Rep: Reputation: 57
when it is too difficult, I use kfind
or wine totalcommander.exe

 
Old 04-05-2008, 12:30 AM   #7
SBN
Member
 
Registered: Jul 2006
Distribution: UBUNTU, CentOS, FEDORA 8
Posts: 474

Original Poster
Rep: Reputation: 30
yup the -and works... thank
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
encoding techniques in thickserver mathimca05 Linux - Newbie 1 10-15-2007 12:10 AM
Error Handling Techniques ( C ) Centinul Programming 6 10-12-2006 10:49 AM
LXer: Advanced techniques for using the UNIX find command LXer Syndicated Linux News 0 05-04-2006 04:21 AM
Techniques of TV dlynch912 General 1 04-17-2006 04:54 AM
backup techniques in solaris. waqar Solaris / OpenSolaris 3 03-12-2006 03:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 02:19 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration