Linux / Unix stuff I always forget

------------------------------------------------------
find

find where-to-look criteria what-to-do

find / -name foo
This will search the whole system for any files named foo and display their pathnames.

find
will display the pathnames of all files in the current directory and all subdirectories.

You can specify as many places to search as you wish:

find /tmp /var/tmp . $HOME -name foo

Comments

/etc/apache2/httpd.conf

but looks like instead it uses:

/etc/apache2/apache2.conf

I encountered a situation where another machine on the network had to use Port 22 for its ssh, but I still wanted my machine to be ssh-accessible.

1. make your router port-forward a port, say 2222, to your machine's ip address (e.g. 192.168.2.4);
2. edit /etc/ssh/sshd_config (save original one as sshd_config_orig);
3. sudo vi /etc/ssh/sshd_config
4. /Port
5. Mine was #'d out, because ssh by default listens to port 22
6. delete the #
7. add a port under that one, so it will look like:
#stuff
#stuff
Port 22
Port 2222
#more stuff
#more stuff
8. Don't forget to restart sshd in any number of ways:
sudo stop ssh
sudo start ssh
-----
sudo /etc/init.d/ssh start