Linux command
1. find files in Linux
find path -name filename
Use find
from the command line to locate a specific file by name or extension. The following example searches for *.err
files in the /home/username/
directory and all sub-directories:
find /home/username/ -name "*.err"
2. Get To Know Linux: The /etc/init.d Directory
/etc/init.d目录包含系统中各种服务的start/stop脚本.
init.d目录下脚本的执行方式为
/etc/initi.d/command OPTION
command指服务的命令,比如bluetooth,networking,samba,ssh等等。OPTION指stop,start,reload,restart,force-reload。
比如重启SSH服务的命令为(执行这个目录下的脚本,需要root用户权限):
$ sudo /etc/init.d/ssh restart
好像service命令 也是调用这里的服务么..
例如,停止SSH服务: service ssh stop