Find Command

4 views
Skip to first unread message

santhosh kumar

unread,
Jun 9, 2015, 2:45:25 PM6/9/15
to skol...@googlegroups.com, skoli...@googlegroups.com
Hi All,
 
[src002@njhqttbapach01 ~]$ find . -type f -name "*.bak"
[src002@njhqttbapach01 ~]$ find / -name "*.bak"
find: `/root': Permission denied
find: `/etc/pki/rsyslog': Permission denied
find: `/etc/pki/CA/private': Permission denied
find: `/etc/sudoers.d': Permission denied
 i'm logged into apache box as sudo user, trying to delete files ending .bak nad .old file. when using find command either not getting results or permission denied. need help on this..
 
Thanks,
Santhosh.

Manish Ravlani

unread,
Jun 9, 2015, 3:11:54 PM6/9/15
to skolix123, skolix-wls6
Use below commands as it is one by one:

cd /
find . -name *.bak -exec ls -rlt {} \;        --- This will show you all files that will get deleted in next step
find . -name *.bak -exec rm -f {} \;


--
You received this message because you are subscribed to the Google Groups "sko_guys" group.
To unsubscribe from this group and stop receiving emails from it, send an email to skolix123+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Thanks
Reply all
Reply to author
Forward
0 new messages