方法1: if grep -qs '/mnt/foo' /proc/mounts; then echo "It's mounted." else echo "It's not mounted." fi 方法2: if mountpoint -q /mnt/foo then echo "mounted" else echo "not mounted" fi…
from watchdog.observers import Observerfrom watchdog.events import *import time class FileEventHandler(FileSystemEventHandler): def __init__(self): FileSystemEventHandler.__init__(self) def on_moved(self, event): if event.is_directory: print("directo…