比较提交
3 次代码提交
v1.0
...
200b6f6c33
作者 | SHA1 | 提交日期 | |
---|---|---|---|
200b6f6c33 | |||
bcc561d578 | |||
898e114eef |
@ -85,6 +85,14 @@ sudo apt-get update
|
||||
sudo apt-get install adhocify
|
||||
```
|
||||
|
||||
## Alpine
|
||||
```
|
||||
wget https://repo.quitesimple.org/repo%40quitesimple.org-5f3d101.rsa.pub -O /etc/apk/repo@quitesimple.org-5f3d101.rsa.pub
|
||||
echo "https://repo.quitesimple.org/alpine/quitesimple/" >> /etc/apk/repositories
|
||||
apk update
|
||||
apk add adhocify
|
||||
```
|
||||
|
||||
## Other
|
||||
To install from source, run
|
||||
```
|
||||
|
@ -498,7 +498,7 @@ void parse_options(int argc, char **argv)
|
||||
case 'm':
|
||||
optmask = nameToMask(optarg);
|
||||
if(optmask == 0) {
|
||||
logerror("Not supported inotify event: %s\n", optmask);
|
||||
logerror("Not supported inotify event: %s\n", optarg);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
mask |= optmask;
|
||||
|
21
examples/move_downloads.sh
可执行文件
21
examples/move_downloads.sh
可执行文件
@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
#moves all incoming files (e. g. downloads) to another directory.
|
||||
#There, they will be put into subdirectories which are named after the current date (YYYYMMDD) to get some minimal automatic "organization".
|
||||
#adhocify -d -m IN_CLOSE_WRITE -m IN_MOVED_TO -w /home/user/Downloads -w /home/user/other_dir /path/to/move_downloads.sh
|
||||
|
||||
INCOMING="$1"
|
||||
#ignore partial downloads (.part in firefox, .crdownload in chrome)
|
||||
echo "$INCOMING" | grep -q .part$ && exit
|
||||
echo "$INCOMING" | grep -q .crdownload$ && exit
|
||||
today=$(date +%Y%m%d)
|
||||
TARGET_DIR="/target/dir/path"
|
||||
TODAY_DIR="$TARGET_DIR"/$today
|
||||
if [ ! -d "$TODAY_DIR" ] ; then
|
||||
mkdir "$TODAY_DIR"
|
||||
rm -f "$TARGET_DIR"/today
|
||||
ln -s "$TODAY_DIR" "$TARGET_DIR"/today
|
||||
fi
|
||||
#You can also filter/grep the filename here and move certain patterns to other designated locations...
|
||||
mv "$INCOMING" "$TARGET_DIR"/$today/
|
||||
|
||||
|
在新工单中引用
屏蔽一个用户