find コマンドは午前中に新しく起動するたびに実行されます - debianstretch

find コマンドは午前中に新しく起動するたびに実行されます - debianstretch

みんな、

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部分です。updatedbcron

プロセスリストのパラメータをの構成と比較することでfindこれを確認できます/etc/updatedb.conf

Debian Stretchでは、代替とlocateそのコマンドを切り替えることができます。updatedbmlocatelocate.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

おすすめ記事