How to find a directory on a Linux server from root with its name?
Here we are trying to search all the locations where apache2 directory got created after its installation on a Linux server.
Since we don't have any idea of where about of creation of apache2 directories on our server after we installed it using the command:
sudo apt-get install apache2
we can let the Unix command search for it on the whole server from the root itself.
So, the command for searching all created directories of apache2 will be:
find / -type d -name apache2
The output of the command could be like. The output may differ per the shell or flavor of the Linux installed.
root@ataul-virtual-machine:/var/www/html# find / -type d -name apache2
/usr/lib/apache2
/usr/share/doc/apache2
/usr/share/bug/apache2
/usr/share/apache2
/etc/ufw/applications.d/apache2
/etc/apache2
/var/lib/apache2
/var/cache/apache2
/var/log/apache2
/run/apache2
/run/lock/apache2
Here we are trying to search all the locations where apache2 directory got created after its installation on a Linux server.
Since we don't have any idea of where about of creation of apache2 directories on our server after we installed it using the command:
sudo apt-get install apache2
we can let the Unix command search for it on the whole server from the root itself.
So, the command for searching all created directories of apache2 will be:
find / -type d -name apache2
The output of the command could be like. The output may differ per the shell or flavor of the Linux installed.
root@ataul-virtual-machine:/var/www/html# find / -type d -name apache2
/usr/lib/apache2
/usr/share/doc/apache2
/usr/share/bug/apache2
/usr/share/apache2
/etc/ufw/applications.d/apache2
/etc/apache2
/var/lib/apache2
/var/cache/apache2
/var/log/apache2
/run/apache2
/run/lock/apache2
No comments:
Post a Comment