命令行
命令行相关内容
worldzhy
感觉
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
使用 zip 在 mac 上打包文件
// 打包当前目录下的所有文件(包含隐藏文件)及文件夹 $ zip -r code.zip .原创 2022-04-24 14:11:30 · 1217 阅读 · 0 评论 -
ssh: 跳板机-私有子网服务器-数据库
先在terminal中运行以下命令 // 跳板机为 3.225.225.225 // 私有子网中的服务器为 10.100.100.237 ssh -N -L 9200:10.100.100.237:22 -i pinpoint-health.pem ubuntu@3.225.225.225 连接到私有子网中的服务器 基于私有子网中的服务器连接数据库 ...原创 2020-09-15 10:20:18 · 356 阅读 · 0 评论 -
Linux上查看文件大小
ubuntu@ip-10-200-100-47:~/.pm2/logs$ ls pinpoint-backend-error.log pinpoint-backend-out.log pinpoint-frontend-error.log pinpoint-frontend-out.log ubuntu@ip-10-200-100-47:~/.pm2/logs$ du -h pinpoint-backend-out.log 59M pinpoint-backend-out.log ubun.原创 2020-07-31 10:49:30 · 191 阅读 · 0 评论 -
split 文件分割与合并
文件分割 1. 指定分割后文件的行数 split -l 300 server.log new_file_prefix 2. 指定分割后文件的大小 split -b 50m server.log new_file_prefix 文件合并 cat small_files* > large_file原创 2020-07-21 19:04:40 · 1579 阅读 · 0 评论 -
scp 用于ubuntu server之间传递文件
// scp <source> <destination> // 将所在主机上的文件copy到远端主机 // scp /path/to/file username@a:/path/to/destination // 将远端主机上的文件copy到所在主机 // scp username@b:/path/to/file /path/to/destination // 如果主机间连接需要密钥pem文件,使用-i参数 $ scp -i pinpoint-health.pem ubuntu.原创 2020-05-18 23:02:57 · 285 阅读 · 0 评论 -
web grunt serve启动失败
Warning: Running "compass:server" (compass) task Warning: You need to have Ruby and Compass installed and in your system PATH for this task to work. More info: https://github.com/gruntjs/grunt-co原创 2016-03-03 16:28:47 · 3103 阅读 · 0 评论 -
ssh & scp: 远程服务器登录及文件传输
登录 $ ssh -i ./PinPoint-dev.pem ubuntu@52.22.36.108 传输文件 $ scp -i ./PinPoint-dev.pem /path/to/test.txt ubuntu@52.22.36.108:/home/ubuntu/原创 2016-04-27 09:25:16 · 859 阅读 · 1 评论 -
mac 修改terminal中的主机名无效 始终显示localhost
现象:Edit Local Hostname之前是OK的,后来突然不起作用了,在terminal中始终显示localhost。 原因: https://www.google.com/search?client=safari&rls=en&q=bogon&ie=UTF-8&oe=UTF-8 当路由器的DNS使用默认的 192.168.1.1 或 192.168.0.1 的时候 Te转载 2016-04-06 14:47:38 · 6407 阅读 · 0 评论 -
mac 查看端口占用情况
命令 lsof -i tcp:PORTNUMBER 可以查到相应程序的pid,然后用kill杀掉。原创 2016-05-27 11:35:27 · 512 阅读 · 0 评论 -
mac vim快捷键
0 行首 $ (shift+4)行尾 gg 文首 G(shift+g) 文尾 A(Shift+a)文尾,并编辑 ctrl+f 向前翻页 ctrl+b 向后翻页 数字+gg,跳转到数字指定的行 命令模式下直接输入数字跳转到指定的行原创 2016-06-02 09:49:06 · 1293 阅读 · 0 评论
分享