help in find command in linux


 
Thread Tools Search this Thread
Operating Systems Linux help in find command in linux
# 1  
Old 09-05-2011
help in find command in linux

I am trying to find pictures which contains a specific word in the file name.
For example any .JPG files that contains "lm" at the beginning or at the middle or at the end of the file name.
Code:
find / -iname "*.jpg"  | ...

what should go after the pipe?


regards,
Moaathe

Last edited by radoulov; 09-05-2011 at 05:22 PM.. Reason: Code tags!
# 2  
Old 09-05-2011
Hi.

I don't think you need a pipe.

Code:
find / -iname "*lm*.jpg"

A couple of things that might bug you: find won't follow symbolic links by default; find will drill into filesystems you might wish it hadn't (such as a network filesystem or other, in-memory or special, filesystems). You can control all of that from options you will find in your find man page.
This User Gave Thanks to Scott For This Post:
# 3  
Old 09-05-2011
that was very helpful
thank you so much
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Linux find command : how to use multiple conditions

Hello. I need to find all files but excluding some because I need to exclude some sub-folders I need to exclude some filenames Files must be within two dates. The result is sent to a function I cannot achieved to put together the date conditions, the folder conditions and the... (4 Replies)
Discussion started by: jcdole
4 Replies

2. Shell Programming and Scripting

Linux find command seems to not transmit all the result to the '-exec command'

Hello. From a script, a command for a test is use : find /home/user_install -maxdepth 1 -type f -newer /tmp/000_skel_file_deb ! -newer /tmp/000_skel_file_end -name '.bashrc' -o -name '.profile' -o -name '.gtkrc-2.0' -o -name '.i18n' -o -name '.inputrc' Tha command... (3 Replies)
Discussion started by: jcdole
3 Replies

3. UNIX for Beginners Questions & Answers

Linux find command returns nothing

Under one of my directories on server I have more than 500 files with different type and name. When I run the find command to list the files with 'ABC_DEFGH' in the begining of its name and older than 20 days, nothing is return as result. Though I know there are more than 400 files which their name... (10 Replies)
Discussion started by: Home
10 Replies

4. Shell Programming and Scripting

How find Linux version from command line?

Hi, I am looking to extract linux version from /etc/*-release file. I am specifically tring to avoid use of awk command here. would be great if can do done via sed or grep command. Red Hat Enterprise Linux Server release 6.5 (Tikanga) output must be 6 regards, Litu (7 Replies)
Discussion started by: Litu1988
7 Replies

5. Shell Programming and Scripting

Command to find 32/64 bit in Linux

Hi, Can somebody tell me which command will help me find whether the OS is 32 bit or 64 bit. OS is LInux Thanks (3 Replies)
Discussion started by: aish11
3 Replies

6. Shell Programming and Scripting

Issue with Find command on Linux

Hi, I am issuing find command below mentioned ways but it givs different count. I don't understand the behaviour. Could any one have any clue? $ find . -mtime -5 -maxdepth 1 -exec ls -lrt {} \; | wc -l 169 $ find . -mtime -5 -maxdepth 1 | wc -l 47 $ find . -mtime -5 -maxdepth 1 | wc -l... (2 Replies)
Discussion started by: siba.s.nayak
2 Replies

7. UNIX for Advanced & Expert Users

command to find when Linux OS is installed?

hey , Anyone knows command to find when Linux OS is installed? Date and time? (2 Replies)
Discussion started by: crackthehit007
2 Replies

8. UNIX for Dummies Questions & Answers

Command to find 32/64 bit in Linux

Hi, Can somebody tell me which command will help me find whether the OS is 32 bit or 64 bit. Regards, Giridhara Babu Tadikonda. (3 Replies)
Discussion started by: giribt
3 Replies
Login or Register to Ask a Question