みんな、
find
誰も新しく起動するたびに(午前中にシステムを起動するとき)、自動的に実行されます。と関連があるようですupdatedb
。どのように仮定を確認し、自動実行を停止できますか?私のps aux | grep find
結果は次のとおりです。
~~> ps aux | grep find
root 4492 0.0 0.0 4288 748 ? SN 08:10 0:00 /bin/sh /usr/bin/updatedb.findutils
root 4500 0.0 0.0 4288 108 ? SN 08:10 0:00 /bin/sh /usr/bin/updatedb.findutils
root 4526 0.0 0.0 55444 2988 ? SN 08:10 0:00 su nobody -s /bin/sh -c /usr/bin/find / -ignore_readdir_race \( -fstype NFS -o -fstype nfs -o -fstype nfs4 -o -fstype afs -o -fstype binfmt_misc -o -fstype proc -o -fstype smbfs -o -fstype autofs -o -fstype iso9660 -o -fstype ncpfs -o -fstype coda -o -fstype devpts -o -fstype ftpfs -o -fstype devfs -o -fstype mfs -o -fstype shfs -o -fstype sysfs -o -fstype cifs -o -fstype lustre_lite -o -fstype tmpfs -o -fstype usbfs -o -fstype udf -o -fstype ocfs2 -o -type d -regex '\(^/tmp$\)\|\(^/usr/tmp$\)\|\(^/var/tmp$\)\|\(^/afs$\)\|\(^/amd$\)\|\(^/alex$\)\|\(^/var/spool$\)\|\(^/sfs$\)\|\(^/media$\)\|\(^/var/lib/schroot/mount$\)' \) -prune -o -print0
nobody 4538 0.0 0.0 4288 748 ? SNs 08:10 0:00 sh -c /usr/bin/find / -ignore_readdir_race \( -fstype NFS -o -fstype nfs -o -fstype nfs4 -o -fstype afs -o -fstype binfmt_misc -o -fstype proc -o -fstype smbfs -o -fstype autofs -o -fstype iso9660 -o -fstype ncpfs -o -fstype coda -o -fstype devpts -o -fstype ftpfs -o -fstype devfs -o -fstype mfs -o -fstype shfs -o -fstype sysfs -o -fstype cifs -o -fstype lustre_lite -o -fstype tmpfs -o -fstype usbfs -o -fstype udf -o -fstype ocfs2 -o -type d -regex '\(^/tmp$\)\|\(^/usr/tmp$\)\|\(^/var/tmp$\)\|\(^/afs$\)\|\(^/amd$\)\|\(^/alex$\)\|\(^/var/spool$\)\|\(^/sfs$\)\|\(^/media$\)\|\(^/var/lib/schroot/mount$\)' \) -prune -o -print0
nobody 4539 7.9 0.0 16844 2752 ? DN 08:10 0:06 /usr/bin/find / -ignore_readdir_race ( -fstype NFS -o -fstype nfs -o -fstype nfs4 -o -fstype afs -o -fstype binfmt_misc -o -fstype proc -o -fstype smbfs -o -fstype autofs -o -fstype iso9660 -o -fstype ncpfs -o -fstype coda -o -fstype devpts -o -fstype ftpfs -o -fstype devfs -o -fstype mfs -o -fstype shfs -o -fstype sysfs -o -fstype cifs -o -fstype lustre_lite -o -fstype tmpfs -o -fstype usbfs -o -fstype udf -o -fstype ocfs2 -o -type d -regex \(^/tmp$\)\|\(^/usr/tmp$\)\|\(^/var/tmp$\)\|\(^/afs$\)\|\(^/amd$\)\|\(^/alex$\)\|\(^/var/spool$\)\|\(^/sfs$\)\|\(^/media$\)\|\(^/var/lib/schroot/mount$\) ) -prune -o -print0
cathyserver 5223 0.0 0.0 13380 940 pts/1 S+ 08:12 0:00 grep find
最初の印象は、あるデーモンが/var /tmp /var/spool /alex /amd /afs /var/tmp
何かを探しているということです。どのプロセス/デーモンがこれを実行しているのか、どうすればわかりますか?これはWebサーバーですか?さて/alex /amd
、私のシステムにディレクトリがありません。
ベストアンサー1
これは実際に毎日実行され、デーモンによって実行されるfind
部分です。updatedb
cron
プロセスリストのパラメータをの構成と比較することでfind
これを確認できます/etc/updatedb.conf
。
Debian Stretchでは、代替とlocate
そのコマンドを切り替えることができます。updatedb
mlocate
locate.findutils
sudo apt install mlocate locate
sudo update-alternatives --config locate
モバイルポジショニング
cron
デーモンで使用されます/etc/cron.daily/mlocate
。
毎日の実行を無効にするには、パッケージを削除するか、mlocate
実行権限を削除してクローン操作を無効にできます。
sudo chmod -x /etc/cron.daily/mlocate
再度有効にするには:
sudo chmod +x /etc/cron.daily/mlocate
検索.findutils
cron
デーモンで使用されます/etc/cron.daily/locate
。
毎日の実行を無効にするには、パッケージを削除するか、locate
実行権限を削除してクローン操作を無効にできます。
sudo chmod -x /etc/cron.daily/locate
再度有効にするには:
sudo chmod +x /etc/cron.daily/locate
ラインソースの無効化/有効化:https://askubuntu.com/questions/268130/can-i-disable-updatedb-mlocate