Shell
常用shell小结, 包含Linux及windows
aaa_dai
https://github.com/Song2017
展开
-
Mac常用应用 brew list
==> Formulaeautoconf gdbm go libffi libtasn1 maven openjdk pkg-config wgetbdw-gc gettext guile libgcrypt libtool minikube openjdk@11原创 2021-11-16 10:49:42 · 1758 阅读 · 0 评论 -
Mac alias .zshrc
export PATH="/usr/local/opt/bzip2/bin:$PATH"export LDFLAGS="-L/usr/local/opt/bzip2/lib"export CPPFLAGS="-I/usr/local/opt/bzip2/include"eval "$(pyenv init -)"export PATH="/usr/local/opt/openjdk@11/bin:$PATH"export PATH="/usr/local/sbin:$PATH"export JA原创 2021-11-16 10:47:19 · 839 阅读 · 0 评论 -
Windows 软连接
Windows的gitbash中运行 ln -s会复制文件运行管理员权限的cmd指令切换盘符:cd /D "D:"使用mklink创建软连接:mklink /d "D:\workspace\test" "D:\workspace\nomad_lib"注意:mklink 目录地址为绝对地址,要加双引号...原创 2021-11-09 11:05:18 · 509 阅读 · 0 评论 -
shell命令小结
文件初始化文件echo 'init' > test.txt追加字符串到文件echo 'init' >> test.txt替换字符串sed -i s#\'#\"#g test.txt文件夹文件夹内所有文件的总行数find ./target-directory -type f | xargs cat | wc -l替换文件夹内所有文件中的字符串find ./* -exec sed -i 's/apple/iphone/g' {} \;在原创 2021-07-28 11:22:36 · 116 阅读 · 0 评论 -
ubuntu 16 setup mariadb 10.0(a.k.a.mysql) log-error
OS: ubuntu16.04 mariadb 其实就是mysql, 只不过mysql被oracle收购,为防止oracle闭源,所以mysql社区外延出了mariadb。 之前一直修改my.cnf,但没什么效果,后来改动mariadb.cnf,成功指定log-error路径文件安装 DEBIAN_FRONTEND=noninteractive + -y : 无交互安装apt-get upd原创 2017-05-16 17:06:31 · 484 阅读 · 0 评论 -
apachectl vs httpd
apachectl - Apache HTTP Server Control Interfaceapachectl is a front end to the Apache HyperText Transfer Protocol (HTTP) server. It is designed to help the administrator control the functioning of t...原创 2017-04-11 13:40:38 · 653 阅读 · 0 评论 -
ubuntu+nginx简单调试指令
环境:ubuntu 16.04安装apt-get update && apt-get install -y --no-install-recommends nginx启动service启动: service nginx start二进制文件启动: /usr/sbin/nginx信号指令例:nginx -s reload 可以在不重启nginx的情况下刷新服务器的配置文...原创 2017-05-11 18:40:12 · 1406 阅读 · 0 评论 -
常用命令小结(Linux/Windows)
Linux刚安装ubuntu,vi在编辑状态下方向键不能用,还有回格键不能删除等我们平时习惯的一些键都不能使用。 解决办法: 可以安装vim full版本,在full版本下键盘正常,安装好后同样使用vi命令。 安装vim: ubuntu预装的是vim tiny版本,而需要的是vim full版本。执行下面的语句安装vim full版本: $sudo apt-get remo...原创 2018-10-18 09:45:49 · 226 阅读 · 0 评论 -
Win10 Install Ubuntu Via Hyper-v
Hyper-v是windows内置的虚拟化工具,类似于VirtualMare,只不过只适用于Windows操作系统。接下来简述一下启用Hyper-V Manager并安装Ubuntu的步骤。 详细步骤启用Hyper-VControl Panel> Programs and Features> Turn Windows features on or off> check Hyper-v 需要事先在原创 2017-11-11 16:56:59 · 625 阅读 · 0 评论 -
Linux Bash 小结
$(command) 命令置换is “command substitution”. As you seem to understand, it runs the command, captures its output, and inserts that into the command line that contains the $(…); ``` $ ls -ld $(date +%原创 2017-10-23 19:16:30 · 278 阅读 · 0 评论 -
Ubuntu install Python3.6
Env: Ubuntu 16.04instructions # to install add-apt-repository * apt-get update && apt-get install -y software-properties-common * yes | add-apt-repository ppa:jonathonf/python-3.6 * apt-get upda原创 2017-07-04 18:17:27 · 1482 阅读 · 0 评论 -
Linux command ps
ps(process): report a snapshot of the current processesLinux 中运行的程序(包括守护进程,也就是后台进程)就是一个个带有状态的进程, ps呈现进程的数据快照-a: 显示所有进程,除了session leaders(pid=sid)和未关联终端的进程u: Display user-oriented format 用户向格式化x: BSD原创 2017-06-12 17:34:06 · 797 阅读 · 0 评论 -
ubuntu find+sed+grep+args
find+sed 实现对目录中文件指定字符串替换grep+args 删除当前test文件夹中keep文件之外的所有文件原创 2017-05-31 11:17:50 · 733 阅读 · 0 评论 -
ubuntu find+sed 实现对目录中文件指定字符串替换
find - search for files in a directory hierarchysed - stream editor for filtering and transforming textfind ./* -exec sed -i 's/apple/iphone/g' {} \;将当前目录下(包括子目录)中所有文件中的apple替换为iPhone原创 2017-04-19 16:24:01 · 3079 阅读 · 0 评论 -
ubuntu install VS Code
ben@virtualUnbuntu:~$ sudo add-apt-repository ppa:ubuntu-desktop/ubuntu-make[sudo] password for ben:...ben@virtualUnbuntu:~$ sudo apt-get update...Do you want to continue? [Y/n] y...ben@virtual原创 2017-02-18 15:04:32 · 852 阅读 · 0 评论 -
Ubuntu安装PHP,MySQL,Apache
https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-ubuntu-16-04翻译 2017-01-19 20:24:43 · 598 阅读 · 2 评论