LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 11-16-2009, 04:31 AM   #1
Volcano
Member
 
Registered: Sep 2005
Posts: 225

Rep: Reputation: 15
command to find the filename


I need a command to find the filename which contains the text "Your Responsibility"

From /shared/app/calc/justservi8701/AbcDig/

this folder I have lots of files and folders .
 
Old 11-16-2009, 04:35 AM   #2
bigearsbilly
Senior Member
 
Registered: Mar 2004
Location: england
Distribution: Mint, Armbian, NetBSD, Puppy, Raspbian
Posts: 3,515

Rep: Reputation: 239Reputation: 239Reputation: 239
find /shared/app/calc/justservi8701/AbcDig/ -type f -exec grep -l "Your Responsibility" {} \;
 
Old 11-16-2009, 05:07 AM   #3
Volcano
Member
 
Registered: Sep 2005
Posts: 225

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by bigearsbilly View Post
find /shared/app/calc/justservi8701/AbcDig/ -type f -exec grep -l "Your Responsibility" {} \;
>>>{} \;

what this does ?


>>>-type f

what this does ?
 
Old 11-16-2009, 05:14 AM   #4
bigearsbilly
Senior Member
 
Registered: Mar 2004
Location: england
Distribution: Mint, Armbian, NetBSD, Puppy, Raspbian
Posts: 3,515

Rep: Reputation: 239Reputation: 239Reputation: 239
man find

{} = insert filename
\; = terminate command
-type f = file

read the manual
 
Old 11-16-2009, 05:26 AM   #5
Volcano
Member
 
Registered: Sep 2005
Posts: 225

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by bigearsbilly View Post
man find

{} = insert filename
\; = terminate command
-type f = file

read the manual
perfect....this is working fine.

you were very much helpful
 
Old 11-16-2009, 05:29 AM   #6
bigearsbilly
Senior Member
 
Registered: Mar 2004
Location: england
Distribution: Mint, Armbian, NetBSD, Puppy, Raspbian
Posts: 3,515

Rep: Reputation: 239Reputation: 239Reputation: 239
you're most welcome
 
  


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
Find/grep command to find matching files, print filename, then print matching content stefanlasiewski Programming 9 06-30-2016 05:30 PM
How to find a filename which contain particular pattern and want to move to gauravjain111 Linux - Newbie 4 11-09-2009 06:22 AM
Find/grep/wc command to find matching files, print filename and word count dbasch Linux - Newbie 10 09-14-2009 05:55 PM
What does the command do, &> filename? manohare Linux - General 2 03-02-2009 04:19 AM
find filename after an install sporkit Linux - Software 4 06-15-2004 12:20 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:29 AM.

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