LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Puppy
User Name
Password
Puppy This forum is for the discussion of Puppy Linux.

Notices


Reply
  Search this Thread
Old 02-13-2016, 04:44 PM   #1
Fixit7
Senior Member
 
Registered: Mar 2014
Location: El Lago, Texas
Distribution: Ubuntu_Mate 16.04
Posts: 1,374

Rep: Reputation: 169Reputation: 169
Pfind - find files that only begin with ld


If I want to search for just files that begin with ld, how do I do it without any files with ld in the name showing up ?
 
Old 02-13-2016, 07:50 PM   #2
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,502

Rep: Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489
Quote:
find /home/user -type f -name "ld*"
The example above finds all files in the /home/user directory beginning with ld. Change it to fit what you want. Numerous examples at the link below for different options.

https://www.digitalocean.com/communi...on-a-linux-vps
 
Old 02-13-2016, 09:12 PM   #3
Fixit7
Senior Member
 
Registered: Mar 2014
Location: El Lago, Texas
Distribution: Ubuntu_Mate 16.04
Posts: 1,374

Original Poster
Rep: Reputation: 169Reputation: 169
Thanks, this also worked.

Quote:
find / -name ld*
Pfind is not near as versatile as find.
 
Old 02-13-2016, 09:56 PM   #4
Sefyir
Member
 
Registered: Mar 2015
Distribution: Linux Mint
Posts: 634

Rep: Reputation: 316Reputation: 316Reputation: 316Reputation: 316
Quote:
Originally Posted by Fixit7 View Post
Thanks, this also worked.
find / -name ld*
Pfind is not near as versatile as find.
Works but might have unexpected behaviour.

Do you want files starting with Ld, LD, lD to show up as well?
What about directories? The command you use will locate directories, symbolic links, FIFO's etc. Using -type f (mentioned by yancek) restrains it to only files.
Also, files that are named ld will show up. if you only want files, starting with ld, and case-sensitive.

Code:
find / -name 'ld?*' -type f
 
Old 02-13-2016, 10:45 PM   #5
Fixit7
Senior Member
 
Registered: Mar 2014
Location: El Lago, Texas
Distribution: Ubuntu_Mate 16.04
Posts: 1,374

Original Poster
Rep: Reputation: 169Reputation: 169
Thanks for the explanation.
 
  


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
I need to see "hidden" files (ones whose names begin with a period) BurtHulland Linux - Desktop 2 09-25-2014 06:38 PM
find hidden files from wild card path using 'find' nagendrar Linux - Newbie 5 10-13-2011 10:48 PM
Find/grep/wc command to find matching files, print filename and word count dbasch Linux - Newbie 10 09-14-2009 05:55 PM
wanna to add in newlines in begin and end of multiple files tiaratiara Linux - Newbie 8 03-18-2009 09:32 PM
Is there a way to find recently created/edited files without using find? BrianK Linux - General 2 10-15-2007 09:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Puppy

All times are GMT -5. The time now is 08:28 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