The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

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 12-13-2007
Registered User
 

Join Date: Feb 2006
Posts: 40
using find command

i want to find the file msk_Rco_ijkl_20070925_033743.Z
i am using the below command but it is returning with the below metioned error
how to solve it
find . -name 'msk_Rco_ijkl_*' -mtime -60 -print
find: bad option msk_Rco_ijkl_20070925_033743.Z
find: [-H | -L] path-list predicate-list
Reply With Quote
Forum Sponsor
  #2  
Old 12-13-2007
Registered User
 

Join Date: Jan 2007
Posts: 2,965
Code:
find . -name msk_Rco_ijkl_\* -mtime -60 -print
Reply With Quote
  #3  
Old 12-13-2007
Registered User
 

Join Date: Feb 2006
Posts: 40
hi
i gave the command like u mentioned
but i am getting things like


find: bad option msk_Rco_ijkl_20070925_033743.Z
find: [-H | -L] path-list predicate-list

i want only the file name not other things
how to do it
Reply With Quote
  #4  
Old 12-13-2007
Moderator
 

Join Date: Feb 2007
Posts: 2,329
Try it without quotes:

Code:
find . -name msk_Rco_ijkl_* -mtime -60 -print
Regards
Reply With Quote
  #5  
Old 12-13-2007
rikxik's Avatar
Registered User
 

Join Date: Dec 2007
Posts: 105
What the heck - it works for me with quotes, without quotes:

Code:
$ ls tmp/msk_Rco_ijkl_20070925_033743.Z
tmp/msk_Rco_ijkl_20070925_033743.Z
$ find . -name 'msk_Rco_ijkl_*' -mtime -60 -print
./tmp/msk_Rco_ijkl_20070925_033743.Z
$ find . -name msk_Rco_ijkl_* -mtime -60 -print
./tmp/msk_Rco_ijkl_20070925_033743.Z
Interestingly, when I supplied a bad argument, got this:

Code:
$ find -z
find: path-list predicate-list
Didn't get any mention of -H | -L. You may want to check the man for your version of find and see some examples for the supplied syntax.
Reply With Quote
  #6  
Old 12-13-2007
Registered User
 

Join Date: Feb 2006
Posts: 40
i am just giving this thing

find . -name msk_Rco_ijkl_* -mtime -60 -print

and i am getting

find: bad option msk_Rco_ijkl_123.Z
find: [-H | -L] path-list predicate-list
Reply With Quote
  #7  
Old 12-13-2007
Bughunter Extraordinaire
 

Join Date: May 2005
Location: In the leftmost byte of /dev/kmem
Posts: 1,262
could you please tell us which OS, which version and which find you are using. Pls. put here the output of the folling commands:

# uname -a
# which find

bakunin
Reply With Quote
Google The UNIX and Linux Forums
Reply

Tags
mtime

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 07:06 AM.


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