LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-09-2012, 01:59 AM   #1
gselvam
LQ Newbie
 
Registered: Aug 2011
Posts: 6

Rep: Reputation: Disabled
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
 
Old 07-09-2012, 02:07 AM   #2
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
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
 
1 members found this post helpful.
Old 07-09-2012, 02:08 AM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,513

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
find <foldername>/ -name "sel*.fmb"
 
Old 07-09-2012, 02:31 AM   #4
gselvam
LQ Newbie
 
Registered: Aug 2011
Posts: 6

Original Poster
Rep: Reputation: Disabled
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
 
Old 07-09-2012, 02:40 AM   #5
gselvam
LQ Newbie
 
Registered: Aug 2011
Posts: 6

Original Poster
Rep: Reputation: Disabled
It is working now

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

Thanks

Last edited by gselvam; 07-09-2012 at 02:41 AM.
 
Old 07-09-2012, 02:51 AM   #6
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hi,

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

Kind regards,

Eric
 
Old 07-09-2012, 04:05 AM   #7
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
Quote:
Originally Posted by gselvam View Post
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.
 
Old 07-09-2012, 04:24 AM   #8
gselvam
LQ Newbie
 
Registered: Aug 2011
Posts: 6

Original Poster
Rep: Reputation: Disabled
Thank you ...
Will follow the Linux rules..
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
rsync excluding a single file/folder guna_pmk Linux - Software 1 04-05-2011 05:59 AM
Shell Script To extract more than one tar file in to a single folder greensuman Linux - General 5 12-02-2009 11:08 PM
Find folders with ONLY one specific file in and delete file and folder - How ? gedi1 Linux - Newbie 5 10-21-2009 08:09 PM
find and move to folder and file dulahdaglace Linux - Newbie 1 09-15-2009 10:44 PM
my folder turned into a single file!! how to recover? RohitBhosale Linux - General 1 07-06-2009 03:14 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:32 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration