Hey guys,
Sorry not sure what's wrong with this statement. I've tried a few variations of trying to exclude the /var/www directory.
[root@224432-24 apr-1.5.1]# find / -name "*httpd*" -type d ( ! -name www ) /usr/lib/httpd /usr/lib64/httpd /var/www/vhosts/johnnyenglish/httpdocs /var/www/lpaddevbkp/alchemist/namespace/system-config-httpd /var/www/lpaddevbkp/httpd
The ultimate intention once I get a suitable find command is to delete all references to httpd. I'm trying to do a clean install of apache 'the company way'. But before I do that I want to get rid of the apache that was there.
I've already queried the rpm database and did a yum remove of the apache packages.
So where I'm I going wrong with the above statement? Looks right to me!
Thanks Tim
On 10/28/2014 11:00 PM, Tim Dunphy wrote:
Hey guys,
Sorry not sure what's wrong with this statement. I've tried a few variations of trying to exclude the /var/www directory.
[root@224432-24 apr-1.5.1]# find / -name "*httpd*" -type d ( ! -name www ) /usr/lib/httpd /usr/lib64/httpd /var/www/vhosts/johnnyenglish/httpdocs /var/www/lpaddevbkp/alchemist/namespace/system-config-httpd /var/www/lpaddevbkp/httpd
The ultimate intention once I get a suitable find command is to delete all references to httpd. I'm trying to do a clean install of apache 'the company way'. But before I do that I want to get rid of the apache that was there.
I've already queried the rpm database and did a yum remove of the apache packages.
So where I'm I going wrong with the above statement? Looks right to me!
Thanks Tim
Hi,
Try:
find / -name "*httpd*" -type d |grep -v www
Regards
ChrisG
Hi
find / -name "*httpd*" -type d |grep -v www\
Thanks.. Ideally I'd like to use the -delete flag to find once i have the right command. But with that I suppose I could use find / -name "*httpd*" -type d |grep -v www\ | xargs rm -rfv
Assuming that the initial find doesn't do anything too scary.
Thanks Tim
On Tue, Oct 28, 2014 at 5:11 PM, Chris Geldenhuis chris.gelden@iafrica.com wrote:
On 10/28/2014 11:00 PM, Tim Dunphy wrote:
Hey guys,
Sorry not sure what's wrong with this statement. I've tried a few variations of trying to exclude the /var/www directory.
[root@224432-24 apr-1.5.1]# find / -name "*httpd*" -type d ( ! -name www ) /usr/lib/httpd /usr/lib64/httpd /var/www/vhosts/johnnyenglish/httpdocs /var/www/lpaddevbkp/alchemist/namespace/system-config-httpd /var/www/lpaddevbkp/httpd
The ultimate intention once I get a suitable find command is to delete all references to httpd. I'm trying to do a clean install of apache 'the company way'. But before I do that I want to get rid of the apache that was there.
I've already queried the rpm database and did a yum remove of the apache packages.
So where I'm I going wrong with the above statement? Looks right to me!
Thanks Tim
Hi,
Try:
find / -name "*httpd*" -type d |grep -v www
Regards
ChrisG _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
2014-10-28 23:00 GMT+02:00 Tim Dunphy bluethundr@gmail.com:
Hey guys,
Sorry not sure what's wrong with this statement. I've tried a few variations of trying to exclude the /var/www directory.
[root@224432-24 apr-1.5.1]# find / -name "*httpd*" -type d ( ! -name www ) /usr/lib/httpd /usr/lib64/httpd /var/www/vhosts/johnnyenglish/httpdocs /var/www/lpaddevbkp/alchemist/namespace/system-config-httpd /var/www/lpaddevbkp/httpd
The ultimate intention once I get a suitable find command is to delete all references to httpd. I'm trying to do a clean install of apache 'the company way'. But before I do that I want to get rid of the apache that was there.
I've already queried the rpm database and did a yum remove of the apache packages.
So where I'm I going wrong with the above statement? Looks right to me!
In centos, the apache package is named httpd, not apache. try removing the packages first. (yum remove httpd)
-- Eero
In centos, the apache package is named httpd, not apache. try removing the packages first. (yum remove httpd)
Yup! Already done. I did say I removed apache packages, realizing the name of the package is actually httpd in centos. My bad for not communicating clearly. This exercise is just to remove any stray bits of httpd that are left on the system before I do a source install. It's what the client wants.
thanks tim
On Tue, Oct 28, 2014 at 5:20 PM, Eero Volotinen eero.volotinen@iki.fi wrote:
2014-10-28 23:00 GMT+02:00 Tim Dunphy bluethundr@gmail.com:
Hey guys,
Sorry not sure what's wrong with this statement. I've tried a few variations of trying to exclude the /var/www directory.
[root@224432-24 apr-1.5.1]# find / -name "*httpd*" -type d ( ! -name
www
) /usr/lib/httpd /usr/lib64/httpd /var/www/vhosts/johnnyenglish/httpdocs /var/www/lpaddevbkp/alchemist/namespace/system-config-httpd /var/www/lpaddevbkp/httpd
The ultimate intention once I get a suitable find command is to delete
all
references to httpd. I'm trying to do a clean install of apache 'the company way'. But before I do that I want to get rid of the apache that
was
there.
I've already queried the rpm database and did a yum remove of the apache packages.
So where I'm I going wrong with the above statement? Looks right to me!
In centos, the apache package is named httpd, not apache. try removing the packages first. (yum remove httpd)
-- Eero _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
On 10/28/2014 04:00 PM, Tim Dunphy wrote:
Hey guys,
Sorry not sure what's wrong with this statement. I've tried a few variations of trying to exclude the /var/www directory.
[root@224432-24 apr-1.5.1]# find / -name "*httpd*" -type d ( ! -name www ) /usr/lib/httpd /usr/lib64/httpd /var/www/vhosts/johnnyenglish/httpdocs /var/www/lpaddevbkp/alchemist/namespace/system-config-httpd /var/www/lpaddevbkp/httpd
Well, no name that matches "*httpd*" will also match "www", so that last term will never match. What you want is the "prune" action:
find / -name www -prune -o -name "*httpd*"
On 10/28/2014 5:32 PM, Robert Nichols wrote:
On 10/28/2014 04:00 PM, Tim Dunphy wrote:
Hey guys,
Sorry not sure what's wrong with this statement. I've tried a few variations of trying to exclude the /var/www directory.
[root@224432-24 apr-1.5.1]# find / -name "*httpd*" -type d ( ! -name www ) /usr/lib/httpd /usr/lib64/httpd /var/www/vhosts/johnnyenglish/httpdocs /var/www/lpaddevbkp/alchemist/namespace/system-config-httpd /var/www/lpaddevbkp/httpd
Well, no name that matches "*httpd*" will also match "www", so that last term will never match. What you want is the "prune" action:
find / -name www -prune -o -name "*httpd*"
Or use -path instead of -name.
Your original find statement should work with the -path test.
find / -name "*httpd*" -type d ( ! -path /var/www )
but combining it with -prune is more efficient since it excludes the whole directory tree instead of individually excluding each file.
find / -path /var/www -prune -o -name "*httpd*"