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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
07-09-2012, 01:59 AM
|
#1
|
LQ Newbie
Registered: Aug 2011
Posts: 6
Rep:
|
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
|
|
|
07-09-2012, 02:07 AM
|
#2
|
LQ Guru
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
|
Hello,
Have a look at the man page for 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.
|
07-09-2012, 02:08 AM
|
#3
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,519
|
find <foldername>/ -name "sel*.fmb"
|
|
|
07-09-2012, 02:31 AM
|
#4
|
LQ Newbie
Registered: Aug 2011
Posts: 6
Original Poster
Rep:
|
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
|
|
|
07-09-2012, 02:40 AM
|
#5
|
LQ Newbie
Registered: Aug 2011
Posts: 6
Original Poster
Rep:
|
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.
|
|
|
07-09-2012, 02:51 AM
|
#6
|
LQ Guru
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
|
Hi,
Great! If you consider your problem solved then please mark the thread as such. Have fun with Linux.
Kind regards,
Eric
|
|
|
07-09-2012, 04:05 AM
|
#7
|
LQ Addict
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464
Rep:
|
Quote:
Originally Posted by gselvam
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.
|
|
|
07-09-2012, 04:24 AM
|
#8
|
LQ Newbie
Registered: Aug 2011
Posts: 6
Original Poster
Rep:
|
Thank you ...
Will follow the Linux rules..
|
|
|
All times are GMT -5. The time now is 01:52 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|