HA

Bash

使用命令行控制屏幕亮度,声音 # 下载nircmd - https://www.nirsoft.net/utils/nircmd.html # 设置亮度(最大100?) nircmd.exe setbrightness 100 # 修改音量(最大65535) nircmd.exe setsysvolume 15000 # 静音,取消静音设为1 nircmd.exe
为命令行配置代理 # 注意代理要是http代理,sock代理是不行的 export HTTP_PROXY='127.0.0.1:1086' export HTTPS_PROXY='127.0.0.1:1086' 把desktop文件的程序固定到任务栏 复制desktop文件到~/.
uuidgen 生成uuid history 命令行历史 修改history容量,~/.bashrc最后追加 export HISTSIZE=10000 export HISTFILESIZE=10000 df du # 查看磁盘占用 df -h # 查看文件夹大小 du -h -d 1 # 排序 du -m
crontab -e A B C D E USERNAME /path/to/command arg1 arg2 Explanation of above cron syntax: A: Minutes range: 0 – 59 B: Hours range: 0 – 23 C: Days range: 0 – 31 D: Months range: 0 – 12 E: Days of the week range: 0 – 7. Starting from Monday, 0 or 7 represents Sunday USERNAME: replace this with your username /path/to/command – The name of the script
bash函数 将函数追加写入~/.bashrc文件即可持久化,否则只在当前shell session内有效,关闭即无效 不要忘记加完需要sourc