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 Advanced & Expert Users
.
google unix.com



UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
AWK command giving wrong input usha rao UNIX for Dummies Questions & Answers 3 04-01-2009 04:41 AM
whats wrong with this find statement ? crackthehit007 Shell Programming and Scripting 2 03-26-2009 04:52 AM
Is anything wrong with this command akhtar.bhat Shell Programming and Scripting 8 02-13-2009 10:16 AM
what i do wrong, find grep rm, help me plz djdes22 Shell Programming and Scripting 4 04-28-2008 11:45 AM
Whats wrong with the mv command dsravan Shell Programming and Scripting 0 08-10-2006 03:30 PM

Reply
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 06-25-2009
sudhiroracle sudhiroracle is offline
Registered User
  
 

Join Date: Jan 2009
Posts: 14
what is wrong with this find command

i am trying to find the files which are more than 100MB and it was created 10 days ago.
find /lola/loaded -size +102400 -mtime -10 -print | xargs ls -ltr
-rw-rw-r-- 1 lola_adm gdrmp 82054170 Jun 23 06:17 /lola/loaded/ILMEMBER20090622.txt
-rw-rw-r-- 1 lola_adm gdrmp 652080494 Jun 24 03:10 /lola/loaded/web_monthly_0_d0905
-rw-rw-r-- 1 lola_adm gdrmp 652080494 Jun 24 03:24 /lola/loaded/web_monthly_1_d0905
-rw-rw-r-- 1 lola_adm gdrmp 652080494 Jun 24 03:36 /lola/loaded/web_monthly_2_d0905
-rw-rw-r-- 1 lola_adm gdrmp 652080000 Jun 24 03:50 /lola/loaded/web_monthly_3_d0905


But when i tried to find the files which are more than 10 MB and it was created 10 days ago.. using the below command, the produces an output with all the files in that directory. is there anything wrong with the find command.

find /lola/loaded -size +10240 -mtime -10 -print | xargs ls -ltr

please help...
  #2 (permalink)  
Old 06-25-2009
methyl methyl is offline
Registered User
  
 

Join Date: Mar 2008
Posts: 1,165
It's finding the directory file.
Confine the search to files only.

Code:
find /lola/loaded -type f -size +10240 -mtime -10 -print | xargs ls -ltr
  #3 (permalink)  
Old 07-02-2009
sudhiroracle sudhiroracle is offline
Registered User
  
 

Join Date: Jan 2009
Posts: 14
how do we use the depth and max depth in the find command.
  #4 (permalink)  
Old 07-02-2009
chatwizrd chatwizrd is offline
Banned
  
 

Join Date: Nov 2008
Posts: 67
-d <depth>

or

-depth <depth>
Bits Awarded / Charged to chatwizrd for this Post
Date User Comment Amount
07-02-2009 mr.applesauce nice job! 50,000
Reply

Bookmarks

Tags
find

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 04:06 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