Linux command
motion 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Start motion detection with default config
motion
Use a specific config file
motion -c [/etc/motion/motion.conf]
Run in foreground (non-daemon mode)
motion -n
Run as a background daemon
motion -b
Run with verbose logging at a specific level
motion -d [1-9]
Log to a specific file
motion -l [/var/log/motion.log]
Start in pause mode (motion detection disabled until activated)
motion -m
Set process ID file
motion -p [/var/run/motion.pid]
说明
motion is a program that detects motion using a Video4Linux device or network camera. It monitors video feeds for movement and can capture images and video sequences when activity is detected, as well as execute automated actions for notifications or snapshots. The tool supports multiple cameras, live streaming, and configurable motion detection sensitivity. Command-line arguments override corresponding settings in configuration files.
参数
- -c _FILE_
- Specifies the path to the configuration file.
- -n
- Run in non-daemon mode (foreground).
- -b
- Run as a background daemon.
- -s
- Enable setup mode; forces non-daemon execution.
- -d _level_
- Set debug verbosity level from 1 to 9.
- -k _level_
- Set message log type from 1 to 9.
- -l _FILE_
- Specify the log file path.
- -p _FILE_
- Specify the process ID file location.
- -m
- Start in pause mode (motion detection initially disabled).
- -h
- Display help information.
FAQ
What is the motion command used for?
motion is a program that detects motion using a Video4Linux device or network camera. It monitors video feeds for movement and can capture images and video sequences when activity is detected, as well as execute automated actions for notifications or snapshots. The tool supports multiple cameras, live streaming, and configurable motion detection sensitivity. Command-line arguments override corresponding settings in configuration files.
How do I run a basic motion example?
Run `motion` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -c _FILE_ do in motion?
Specifies the path to the configuration file.