The UNIX and Linux Forums  

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
how to find a file named vijay in a directory using find command amirthraj_12 UNIX for Dummies Questions & Answers 6 10-25-2008 09:37 AM
Help Required: Command to find IP address and command executed of a user loggedout Security 2 08-06-2008 05:12 PM
Little bit weired : Find files in UNIX w/o using find or where command jatin.jain Shell Programming and Scripting 10 09-19-2007 03:47 AM
command find returned bash: /usr/bin/find: Argument list too long yacsil Shell Programming and Scripting 1 12-15-2003 03:38 PM
how to find a file in UNIX without find command? bluo Shell Programming and Scripting 3 09-24-2003 08:47 PM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 06-10-2006
Registered User
 

Join Date: Jun 2006
Posts: 2
find command

Hello-

How do you use the UNIX find command to search for all files in the current diectory only? I've tried this on Solaris 8 and it doesnt appear to be working:

find . -depth -type f -mtime 0 -exec ls {} \;

Thank you
Reply With Quote
Forum Sponsor
  #2  
Old 06-10-2006
Registered User
 

Join Date: May 2006
Location: London
Posts: 19
U can use -level along with command

-level 0 --Current dirctory only
-level 1 --Current and sub directory
-level 2 --current,sub,sub-sub directory

Check Syntax of this using -level
Reply With Quote
  #3  
Old 06-10-2006
tayyabq8's Avatar
Moderator
 

Join Date: Nov 2004
Location: Bahrain
Posts: 555
Please try to perform search before posting any queuries, taken from one of the similar threads
Code:
find . \( ! -name . -prune \) -mtime 0 -print
Regards,
Tayyab
Reply With Quote
  #4  
Old 06-10-2006
Registered User
 

Join Date: Jun 2006
Posts: 2
thank you

Thank you for your assistance..... level did not work (prob. because it wasn't an option for my version of find) but "find . \( ! -name . -prune \) -mtime 0 -print" did. I looked all over the internet doing searches but couldn't find this. Next time tho, I'll search within this forum first before posting....

thanks again.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 11:45 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0