1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/bash
cd ~/book_update

find /mnt/chunli/book/ -type f -print0 | xargs -0 -i echo ln -fs \"{}\" > list1

find /mnt/chunli/book/ -type f -print0 | xargs -0 -i echo \"{}\" | sed 's@/mnt/chunli/book/@@g' | sed 's@/@●@g' > list2

paste list1 list2 | grep -v "阅读软件" > list3

mkdir list4
cd list4
bash ../list3
cd ..

rsync -avp --delete --links list4/ ../book_index/

rm -rf list1
rm -rf list2
rm -rf list3
rm -rf list4