Trying to find files on a system that contain a certain string


 
Thread Tools Search this Thread
Operating Systems Linux Ubuntu Trying to find files on a system that contain a certain string
# 1  
Old 02-07-2015
Trying to find files on a system that contain a certain string

I have tried just about every find and grep command possible and I cannot find these damn files!!

This is the problem:

On the node you just swapped in, there are 5 JPEG files whose names contain the word "intro" in some form. Find all five files from on the entire disk (i.e. from root /).




Please someone explain how to do this!!!!
# 2  
Old 02-08-2015
Is this a homework assignment? If it is, please close this thread and open a new thread in the Homework & Coursework Questions forum completely filling in the questionnaire in the template in the following: Rules for Homework & Coursework Questions Forum.

If this isn't homework, please explain where these five files came from and show us what find and grep commands you have tried.

And, explain what you mean by swapping in a node.

And, it is always a good idea to tell us what operating system and shell you're using.
# 3  
Old 02-08-2015
yes it was a HW assignment, but I figured it out.
Also just after posting this I saw the HW section in the forums. Sorry

Thank you
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Find all .sh files in file system and need to replace the string inside .sh files

Hi All, I need to write a script to find all "*.sh" files in /home file system and if any string find "*.sh" files with the name vijay@gmail.com need to replace with vijay.bhaskar@gmail.com. I just understood about the find the command to search .sh files. Please help me on this. find / -name... (3 Replies)
Discussion started by: bhas85
3 Replies

2. Shell Programming and Scripting

Find a string in all files and echo a message

Hi. I m trying to figure out how to do this. I have a directory full of files (100 files) and I want to be able to search for a string called "end" at the end of the files (last line or last 5 lines) and echo each file to say "incomplete" if not found. This is what I have so far. ---... (4 Replies)
Discussion started by: jasonhawaii
4 Replies

3. Shell Programming and Scripting

find duplicate string in many different files

I have more than 100 files like this: SVEAVLTGPYGYT 2 SVEGNFEETQY 10 SVELGQGYEQY 28 SVERTGTGYT 6 SVGLADYNEQF 21 SVGQGYEQY 32 SVKTVLGYEQF 2 SVNNEQF 12 SVRDGLTNSPLH 3 SVRRDREGLEQF 11 SVRTSGSYEQY 17 SVSVSGSPLQETQY 78 SVVHSTSPEAF 59 SVVPGNGYT 75 (4 Replies)
Discussion started by: xshang
4 Replies

4. Shell Programming and Scripting

Need to find a string in files

Hi, I have a directory nsk, files a.sql, b.sql, c.sql, d.sql, assuming that I have line 'INSERT ALL INTO abc' in a.sql and c.sql I need to list a filename, line number and complete line which contains ''INSERT ALL INTO abc' irrespective of case. also in my files mentioned 'INSERT ALL... (4 Replies)
Discussion started by: sunnix
4 Replies

5. Shell Programming and Scripting

How to find particular string in multiple files

Hello friends, I have find a paticular string from the files present in my user for example: a username and password is hardcoded in multiple files which present in the my user.so I have to search about username in which files it is available.there are several dirctories are there,so... (5 Replies)
Discussion started by: sivaranga001
5 Replies

6. Shell Programming and Scripting

Find the user with less number of files in the system

Good morning everybody, I'm using Minix and I want to find the user with less number of files in the system I have tried this solution: #! /bin/sh indice=0 listaCut=$(cut -f 3 -d : /etc/passwd) for USER in $listaCut; do cont=0 listaFind=$(find / -user "${USER}" -type -f) ... (4 Replies)
Discussion started by: Guccio
4 Replies

7. Shell Programming and Scripting

find and replace string in a directory files

Hi, I have a directory has DIR1 and the D1 directory has 200+ files. I want change the string from "Bangalore" to "Bangaluru" in all files in the D1 directory. Thanks (2 Replies)
Discussion started by: koti_rama
2 Replies

8. Shell Programming and Scripting

How to find a string inside files

Hi, I would like to know how to get a list of files that contain a specific string inside them. Thanks (12 Replies)
Discussion started by: yoavbe
12 Replies

9. UNIX for Dummies Questions & Answers

Find and replace a string in multiple files

I used the following script cd pathname for y in `ls *`; do sed "s/ABCD/DCBA/g" $y > temp; mv temp $y; done and it worked fine for finding and replacing strings with names etc. in all files of the given path. I'm trying to replace a string which consists of path (location of file) ... (2 Replies)
Discussion started by: pharos467
2 Replies

10. AIX

where i can find Log files of system

Hello world please, i would like to know where i can find all of : 1 Every connexion whith FTP 2 Every connexion whith telnet 3 Every connexion whith RCP 4 Every event when crash will arrive thanks in advance (1 Reply)
Discussion started by: mktahar
1 Replies
Login or Register to Ask a Question