Shell-date时间日期命令 date 时间日期命令123456cur_date="`date +%Y-%m-%d`"cur_dateTime="`date +%Y-%m-%d,%H:%m:%s`"# 时间 Fri Apr 14 23:39:59 CST 2023# 对应的格式:%a %b %d %H:%M:%S %Z %Y# 或者:%a %b %d %T %Z %Y 2019-12-17 #Shell #date
Linux-开机启动自动运行脚本 总的说来,根据系统的不同,有两种实现开机自启的方法:rc.local与systemd。 rc.local树莓派官方文档对rc.local的介绍。值得注意的是:运行一个常驻脚本或者需要执行时间很长的脚本的时候,需要在命令最后加上&来表明这条命令需要后台运行。否则会阻塞rc.local后面的脚本执行。除此之外,不是所有的命令都支持使用rc.local的方式开机运行。https://www.ra 2019-12-09 #Linux #树莓派
macOS-完全退出Finder 123defaults write com.apple.finder QuitMenuItem -bool YES# 或defaults write com.apple.Finder QuitMenuItem 1 重启 Finder 生效 2019-12-02 #macOS #Finder #访达
Linux-挂载卸载U盘 查看系统自动挂载的分区 1cat /etc/fstab 挂载ExFAT分区 1sudo apt-get install fuse-exfat 分区管理命令https://www.cnblogs.com/xiangsikai/p/10683209.html 123fdiskpartprobe 格式化分区命令https://wiki.archlinux.org/index.php/F2F 2019-11-30 #Linux #树莓派 #mount #unmount
Linux-Shell-根据inode删除文件和目录 列出文件和文件夹的 inode 1ls -i 根据 inode 删除文件或者目录 12345# 1. 用 find 的 -delete 参数删除目录(空目录)find . -inum 123456 -delete# 将 find 结果传递到 rm 命令进行删除find ./* -inum 123456 -exec rm -i {} \; 2019-11-28 #Shell #Linux
Linux-设置时区 设置时区命令 123456789tzselecttimedatectl# 列出所有可用的时区timedatectl list-timezones# 设置时区timedatectl set-timezone Asia/Singapore 2019-11-27 #Linux #时区
Linux-服务管理命令-systemctl 123systemctl stop iptablessystemctl list-unit-files --type=servicesystemctl daemon-reload # 重新载入 参考:linux systemctl命令详解systemd user services and systemctl –user 用户 .service 文件推荐放在 $USER/.config/syst 2019-11-11 #Linux #systemd #树莓派 #systemctl
macOS-查看和开启APFS卷的碎片整理功能 查看和开启APFS卷的碎片整理功能keywords: apfs defragmentation, apfs defrag Usage: diskutil apfs defragment|defrag | status|enable|disable where = APFS Container DiskIdentifier 2019-11-05 #macOS #APFS #diskutil