bash
删除空行
1 | sed -i '/^$/d' *.md |
ssh_copy_id_auto
1 |
|
auto ssh
1 |
|
cleanRAM
1 |
|
gbk2utf
1 |
|
html2md
1 |
|
jpg2pdf
1 |
|
pdf2md
1 | mkdir /path/pdf2md |
led键盘灯
1 |
|
备份
1 |
|
mysql
1 |
|
pgSQL
1 |
|
ntp
1 |
|
proxy
1 |
|
备份vps
1 |
|
1 |
|
qt中文输入
1 |
|
rclone
1 |
|
rclone
1 |
|
rdp
1 |
|
sed
1 | # "在文件name-only的每个行后面添加 \n" |
heic2jpeg
1 |
|
rsync
备份home
1
2
3
4
5
6
7
8
9
10
11
12
13
echo "......删除回收站 清理缓存......"
sudo rm -rf $HOME/.local/share/Trash/files/*
/bin/sh /path/bin/clean-cache-dir.sh
#
sudo mount /dev/sdd4 /mnt/sdd4/
#
sudo rsync -avR --delete-excluded /path/mnt/sdd4/ --exclude={"OSX-KVM/*","Downloads/*","vmware/","VirtualBox\ VMs/*","桌面/*",".cache/*",".nuget/*","go_work/pkg/mod/cache/","/path/.wine/*"} #> /dev/null 2>&1 &
# -aptgovrlHAXzP
sleep 10
sudo umount /dev/sdd4备份 /
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
echo " " > /path/logs/rsync-system-backup-info.log
echo "**********$(date)开始备份**********" >> /path/logs/rsync-system-backup-info.log 2>&1
### -v參數去掉 避免在/var/spool/mail/root中輸出和log file重複信息
# -a 存档模式 等于-rlptgoD(没有-H,-A,-X);
# -X 保留扩展属性;
# -A 保留ACL(暗示--perms);
# -z 在传输过程中压缩文件数据
# -p 保留权限
# -t 保留修改时间
# -g 保留组
# -o 保留所有者(仅限超级用户)
# -r 递归目录
# -l 将符号链接复制为符号链接
# -H 保留硬链接
# -z 传输过程压缩
# -R 使用相对路径名称(从源目录的起始位置 保留路径 备份到目标目录)
sudo mount /dev/sdd5 /mnt/sdd5/
sudo rsync -aptgovrlHAX --delete-excluded --partial --log-file=/path/logs/rsync-system-backup.log / /mnt/sdd5/system-backup/ --exclude={"/root/.cache/*","/usr/src/*","/media/*","/sys/*","/proc/*","/mnt/*","/tmp/*","/run/*","/dev/*","/*","/var/tmp/*","/var/run/*","/var/log/*","/var/adm/*","/var/cache/*","/usr/share/doc/*","root/.npm/_cacache/*"}&& echo "**********$(date):系统备份完毕**********" >> /path/logs/rsync-system-backup-info.log 2>&1
sleep 10
sudo umount /dev/sdd5
shell clock
1 | ### http://www.bkjia.com/xtzh/647316.html |
notifyd
1 | ### xfce4的启动通知 |
history
- 更详细的历史记录
export HISTTIMEFORMAT=’%Y.%m.%d-%T :: ‘ HISTFILESIZE=90000 HISTSIZE=90000
1 |
|
usbmux
1 |
|
bashrc
1 | ### 终端记录器并输出到指定目录 |
profile
1 | #自定义交互式shell别名 |
mkswap
1 | #Here, 1M * 2000 ~= 2GB of swap memory |
python开启网络服务
1 | # 2.x |
自动登录telnet并执行命令
1 |
|
浏览器使用代理上网
- 适用Linux系统
1 | cd /opt/google/chrome/ |