linux shell sleep,wait

linux shell sleep,wait sleep 5 等待 秒 一、启动后台子任务 在执行命令后加&操作符,表示将命令放在子shell中异步执行。可以达到多线程效果。如下, sleep 10 #等待

emacs copy current line

emacs copy current line ;;copy current line (global-set-key (kbd “C-c C-w”) ‘copy-lines) (defun copy-lines(&optional arg) (interactive “p”) (save-excursion (beginning-of-line) (set-mark (point)) (next-line arg) (kill-ring-save (mark) (point)) ) )

find command

find command find 命令默认会递归遍历子目录 1 2 3 4 5 6 # find pathname -options find / -name '*task*.log' # find by file size # >100MB find . -type f -size +102400k -name 按文件名查找文件 1 2 3 4 5 6 7 8 9 10 11 # -name 按文件名查找

MySQL 备份 还原 导入 导出 export import

MySQL 备份 还原 导入 导出 export import 1 2 3 4 5 6 7 8 9 10 11 12 # Export MySQLdump -uwiloon -pPASSWORD --default-character-set=utf8 enlab >enlab.sql # -u 与 username 之前可以有空格, -p 与 password 之间可以有空格, -p 后也可以不跟密码, 命令执行后会

chmod

chmod 1 2 chmod a+x 1.sh chmod og+rwx 1.sh 格式: [ugoa…][+-=][rwxX…][,…] u 拥有者 g 与拥有者同组的 o 其它用户 a 三者都是 chmod -R a+rw folderName -R 对目录下和所有文件和子目录进行相同的权限变更

emacs 自动补全括号

emacs 自动补全括号 ;;; use groovy-mode when file ends in .groovy/.gradle or has #!/bin/groovy at start (autoload ‘groovy-mode “groovy-mode” “Groovy editing mode.” t) (add-to-list ‘auto-mode-alist ‘(".groovy$” . groovy-mode)) (add-to-list ‘interpreter-mode-alist ‘(“groovy” . groovy-mode)) (add-to-list ‘auto-mode-alist ‘(".gradle$” . groovy-mode)) ;;auto pair (defun code-mode-auto-pair () “autoPair” (interactive) (make-local-variable ‘skeleton-pair-alist) (setq skeleton-pair-alist ‘( (?` ?` _ “"") (?( ? _ " )") (?[ ? _ " ]") (?{ n

emacs auto backup

emacs auto backup (setq backup-directory-alist ‘((”” . “~/backup/emacs/backup”))) (setq-default make-backup-file t) (setq make-backup-file t) (setq make-backup-files t) (setq version-control t) (setq kept-old-versions 2) (setq kept-new-versions 10) (setq delete-old-versions t)

shell command basic

shell command basic ascii to binary 1 2 3 4 5 $ echo -n "A" | xxd -b 0000000: 01000001 A $ echo -n "A" | xxd -b | awk '{print $2}' 01000001 https://unix.stackexchange.com/questions/98948/ascii-to-binary-and-binary-to-ascii-conversion-tools base64 > hex 1 echo "YWJj" |base64 -d|xxd Display the last users who have logged onto the system 1 last Display the user and group ids of your current user 1 id Display who is online

emacs 插件安装

emacs 插件安装 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 #edis .emacs (add-to-list 'load-path "/home/wiloon/.emacs.d/lisp") ;;; use groovy-mode when file ends in .groovy or has #!/bin/groovy at start (autoload 'groovy-mode "groovy-mode" "Groovy editing mode." t) ;;files end with .groovy , open as groovy mode (add-to-list 'auto-mode-alist '(".groovy$" . groovy-mode)) (add-to-list 'interpreter-mode-alist '("groovy" . groovy-mode))

修改 MySQL 字符集

修改 MySQL 字符集 查看字符集设置 1 2 3 show variables like 'character_set_%'; 1 2 3 4 5 6 7 8 9 10 11 set character_set_client=utf8; set character_set_connection=utf8; set character_set_database=utf8; set character_set_results=utf8; set character_set_server=utf8; set character_set_database=utf8; ..character_set_client ..character_set_connection ..character_set_database sudo emacs /etc/MySQL/my.cnf 在[client]下添加 default-character-set=utf8 在[MySQLd

MySQL 函数

MySQL 函数 1 2 3 4 5 6 MySQL> select date_format(now(),'%Y-%m-%d'); MySQL> select time_format(now(),'%H-%i-%S'); -- 连接字符串, CONCAT select CONCAT('My', 'S', 'QL');

emacs 配置/config

emacs 配置/config 中文环境 之后,在~/.Xresources (如果没有的话,自己建一个) ,加入下面内容: Xft.antialias: 1 Xft.hinting: 1 Xft.hintstyle: hintfull 调用X Window系统

MySQL 复制

MySQL 复制 1, MySQL的复制原理以及流程。 先问基本原理流程,3个线程以及之间的关联。 答: MySQL复制的三个线程: 主库线程,从库I/O线程,从

MySQL basic

MySQL basic install 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 # client sudo pacman -S mariadb-clients # server + client sudo pacman -S mariadb mariadb-install-db --user=mysql --basedir=/usr --datadir=/var/lib/mysql systemctl start mysql ### 查看有哪些数据库 show databases; ### 创建数据库

linux CLI

linux CLI 作为 Linuxer,必须具备一定的 CLI 操作能力。有时候用 CLI 会比用 GUI 会更方便快捷。 —-lcan http://lcan.info/2011/03/cli-software/#comment-53 以下列出我所知道的一些常用 CLI 软件,仅供参考。

2024

2024 耳鸣差不多已经控制住了 开始测试乳糖牛奶 ENx 已经能满足自己日常使用 开始有计划的每天读书 每天能清空当天的 todo list 开港卡投资美股 完成了一个比较复杂的模