Link to home
Start Free TrialLog in
Avatar of gudii9
gudii9Flag for United States of America

asked on

how to search on file name in unix like xyz.ccfg under my unix server

Hi,

I have xyz.ccfg under my weblogic server.

I logged in to unix weblogic server box.
How do i search on above file name 'xyz.ccfg' to find its exact location like

abc/home/user1/......

i am not sure exactly where it is?


please advise
ASKER CERTIFIED SOLUTION
Avatar of Jan Bacher
Jan Bacher
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of gudii9

ASKER

find / -name xyz.ccfg

says permission denied

please advise
Try "sudo find / -name xyz.ccfg"

You have to have the proper permissions to do a global search.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
That command will show you every file with that character match.
Avatar of gudii9

ASKER

what is meaning of sudo?
how to sudo as some super user to do this?
"sudo" allows non-privileged accounts to run privileged commands as specified in /etc/sudoers.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Would the author please close this question?  There are good options listed here.
Avatar of gudii9

ASKER

let me try
Avatar of gudii9

ASKER

find / -name xyz.ccfg

can i use find to search zip folders also or only files?
find / -name xyz.gz
Avatar of gudii9

ASKER

i did as below and found "a file"
https://www.tutorialspoint.com/unix_terminal_online.php
sh-4.4$ /bin/bash                                                                                                                                  
bash-4.4$ touch a                                                                                                                                  
bash-4.4$ ls -ltr                                                                                                                                  
total 4                                                                                                                                            
-rw-r--r-- 1 36894 36894 978 Nov 28 21:02 README.txt                                                                                              
-rw-r--r-- 1 36894 36894   0 Nov 28 21:02 a  
bash-4.4$ find / -name a                                                                                                                          
find: '/usr/share/doc/scala/api/scala-library/scala/collection': Permission denied  
/home/cg/root/a
can i use find to search zip folders also or only files?

The find command only searches for files.  To search inside a gzip file, you use zgrep.