Find list of files that uses password.


 
Thread Tools Search this Thread
Operating Systems HP-UX Find list of files that uses password.
# 1  
Old 07-11-2011
Find list of files that uses password.

Hi,

I am looking for a command or script which should list out the files that uses database password 'June1232011'.

I know where the files are located (path) .Since there are too many files exist in the directory, i want to find out the files that uses this password.

It would be a great help if you could provide the solution for it.

Thanks
# 2  
Old 07-11-2011
Code:
find /path/to/files -type f -exec grep -l  'June1232011'  {} \;  > passwordfile.lis

Try that to start with. Copy the command exactly, change only the 'path/to/files' part
# 3  
Old 07-11-2011
Thank you .

What to give in place of " path/to/files" and should i run this command from root directory or logging in as root user something like that ?

Thanks
# 4  
Old 07-11-2011
You said you knew the path to the files you want to search. Put the actual directory string starting with /
# 5  
Old 07-12-2011
Thank you for the command.

I executed the command like this .

find /app/interface/home -type f -exec grep -l 'secret123' {} \; > passwordfile.lis

I have one doubt here.

There are some other directories inside /app/interface/home............
/app/interface/home/msocesm/exe

My question here is ... when i execute the find command as below

find /app/interface/home -type f -exec grep -l 'secret123' {} \; > passwordfile.lis

Will this command searches the files in the home/msocesm/exe (which is followed by /app/interface/home directory) ?

Thank you..
# 6  
Old 07-12-2011
Yes.

If you do not want that:
Code:
cd /app/interface/home 
grep -l 'secret123' > $HOME/passwordfile.lis

Where $HOME is your login directory. HOME is usually set for you at login.
# 7  
Old 07-12-2011
Thanks..

Should i run this command as root user ?... because i dont find the output of this command.
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 for files within a list of subfolders

Helo Is there a better way to search within a list of subfolders : A_START_PATH="/data_1/data_2" # # dir2, dir3, dir6, ..... dir59 exists # A_LIST="$A_START_PATH/dir1 $A_START_PATH/dir4 $A_START_PATH/dir5" find "$A_LIST" -type f -name"*.txt" Now searching for all files in any subdirs... (2 Replies)
Discussion started by: jcdole
2 Replies

2. Shell Programming and Scripting

Find command to find a word from list of files

I need to find a word '% Retail by State' in the folder /usr/sas/reports/RetailSalesTaxallocation. When I tried like below, -bash-4.1$ cd /usr/sas/reports/RetailSalesTaxallocation -bash-4.1$ find ./ -name % Retail by State find: paths must precede expression: Retail Usage: find ... (10 Replies)
Discussion started by: Ram Kumar_BE
10 Replies

3. UNIX for Dummies Questions & Answers

Code to list the files of find command

hi, i want to list the files from the below find commands output. find ./* -name "*.txt" -type f -mtime +10 will give the output like ./a.txt but i need the output in the format like (ls -lrt a.txt ) -rw-rw-rw- 1 srea nast 5 May 23 07:34 a.txt i used xargs for the... (4 Replies)
Discussion started by: msathees
4 Replies

4. Shell Programming and Scripting

Find missing files from a list

counter=0; while read line; do ] && let counter=counter+1; done < input_file.txt echo $counter The above code is reading a file line by line and checking whether the filenames mentioned in the file exist or not . At present the o/p is value of counter I want to echo out the name of... (5 Replies)
Discussion started by: ultimatix
5 Replies

5. Shell Programming and Scripting

find list of files from a list and copy to a directory

I will be very grateful if someone can help me with bash shell script that does the following: I have a list of filenames: A01_155716 A05_155780 A07_155812 A09_155844 A11_155876 that are kept in different sub directories within my current directory. I want to find these files and copy... (3 Replies)
Discussion started by: manishabh
3 Replies

6. UNIX for Dummies Questions & Answers

Creating a List of Files With Find

Hi, I need to go through all the files on my system and build a list/output file with the paths of all files where the first two characters within the file match an expression. I know I can use something like find . | xargs cut -b1-2 or find . -exec cut -b1-2 {} \; to get the characters... (3 Replies)
Discussion started by: 008_
3 Replies

7. UNIX for Dummies Questions & Answers

Find files and display only directory list containing those files

I have a directory (and many sub dirs beneath) on AIX system, containing thousands of file. I'm looking to get a list of all directory containing "*.pdf" file. I know basic syntax of find command, but it gives me list of all pdf files, which numbers in thousands. All I need to know is, which... (4 Replies)
Discussion started by: r7p
4 Replies

8. Shell Programming and Scripting

I need a script to find socials in files and output a list of those files

I am trying to find socail security numbers in files in (and under) a specific directory and output a list of the files where they are found... the format would be with no dashes just 9 numeric characters in a row. I have tried this: find /DirToLookIn -exec grep '\{9\}' /dev/null {} \; >>... (1 Reply)
Discussion started by: NewSolarisAdmin
1 Replies

9. Shell Programming and Scripting

How to find the list of files

How to find the list of files of particular type present in Directory and sub-directory. (2 Replies)
Discussion started by: senthilk615
2 Replies

10. UNIX for Dummies Questions & Answers

list read only files using find

hi, how can i list read only files (for u,g,o) using find command? Thanks and Regards Vivek.s (1 Reply)
Discussion started by: vivekshankar
1 Replies
Login or Register to Ask a Question