LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How find a single file in a folder -Linux (https://www.linuxquestions.org/questions/linux-newbie-8/how-find-a-single-file-in-a-folder-linux-4175415637/)

gselvam 07-09-2012 01:59 AM

How find a single file in a folder -Linux
 
I am very new to Linux oS. many years worked in dos/windows

Now i am in Linux os environment

Please help on this

I want to find a particular file is available in current folder or not.

ex : To find file starting with sel with extention fmb, In dos /windows - i will use dir sel*.fmb

Please tell me what is the linux command . I am using Putty to issue linux command

EricTRA 07-09-2012 02:07 AM

Hello,

Have a look at the man page for find:
Code:

man find
The most basic format would be:
Code:

find <path> <expression>
where <path> can be . (dot) for the current directory or an absolute or relative path and expression can be for example -name 'sel*.fmb'.

Kind regards,

Eric

knudfl 07-09-2012 02:08 AM

find <foldername>/ -name "sel*.fmb"

gselvam 07-09-2012 02:31 AM

hi
Thanks for your reply,

In ls command i can see the file 'selvam.fmb' on screen.
But when i am issuing this command
find . -name 'sel*.fmb'

Not getting any reply just getting the prompt only

Please help me

gselvam 07-09-2012 02:40 AM

It is working now

Actually the problem was - i entered name in lower case , but actually it is in UPPER case

Thanks

EricTRA 07-09-2012 02:51 AM

Hi,

Great! If you consider your problem solved then please mark the thread as such. Have fun with Linux.

Kind regards,

Eric

Nylex 07-09-2012 04:05 AM

Quote:

Originally Posted by gselvam (Post 4722713)
Actually the problem was - i entered name in lower case , but actually it is in UPPER case

Note that find also has a case-insensitive test, -iname.

gselvam 07-09-2012 04:24 AM

Thank you ...
Will follow the Linux rules..


All times are GMT -5. The time now is 08:50 PM.