Linux
Balmunc
常常因为自己不够优秀而感到恐慌
展开
-
[Linux]grep无效
错误原因:双引号问题。原创 2023-12-21 15:54:00 · 520 阅读 · 0 评论 -
[Ubuntu]比find更快的查找命令:locate
locate的数据库不是实时的,如果查找内容为空可以尝试执行 updatedb。如果没安装locate,需要先安装 apt install locate。原创 2023-01-28 11:17:27 · 226 阅读 · 0 评论 -
[Linux]cp覆盖
cp -a 会覆盖原文件。原创 2023-03-30 13:57:26 · 370 阅读 · 0 评论 -
[Linux]rsync显示进度
rsync -a -progress --info=progress2原创 2023-01-31 11:24:59 · 1438 阅读 · 0 评论 -
[Ubuntu]bash: ps: command not found
apt install procps原创 2023-01-17 10:24:43 · 595 阅读 · 0 评论 -
[Linux]查看压缩包内容
tar -tvf test.tar.gz原创 2023-01-12 16:10:44 · 2735 阅读 · 0 评论 -
[Linux]查看时区
timedatectl原创 2023-01-10 13:55:28 · 1003 阅读 · 0 评论 -
[Bash]syntax error near unexpected token `&‘
未预期的符号 `&' 附近有语法错误。>和&之间不能有任何空格。原创 2022-10-31 11:42:43 · 2048 阅读 · 0 评论 -
[Bash]((: i=: syntax error: operand expected (error token is “=“)
shell 变量调用需要加 $,但是 for 的 (()) 中不需要。原创 2022-10-28 18:53:27 · 2055 阅读 · 1 评论 -
[Go]session.Run执行ssh报错:Process exited with status 255
解决办法:可能是ip错误,先看下192.168.0.2能ping通吗。原创 2022-10-22 14:34:50 · 376 阅读 · 0 评论 -
[Linux]压缩解压命令
1、压缩将/data/rsync_data/gcol的gcol目录(不包含绝对路径)压缩成/data/rsync_data_bak下的gcol_20180227.gzexec("tar -C /data/rsync_data -czvf /data/rsync_data_bak/gcol_20180227.gz gcol")2、解压将/data下的gcol_20180227.gz解...原创 2018-03-05 10:20:00 · 1465 阅读 · 0 评论 -
[Docker]ERROR: Named volume x is used in service xx but no declaration was found in the volumes
升级docker-compose。原创 2022-10-18 18:46:06 · 497 阅读 · 0 评论 -
[Linux]查看系统版本
lsb_release-a。原创 2022-07-27 16:19:24 · 111 阅读 · 0 评论 -
[Linux]查看TIME_WAIT
netstat-alnt|grep"TIME_WAIT"原创 2022-07-27 16:15:40 · 2031 阅读 · 0 评论 -
[Go]env配置
操作系统:Ubuntugo env -w GO111MODULE=ongo env -w GOPROXY=https://mirrors.aliyun.com/goproxy/,direct原创 2022-07-04 16:34:23 · 961 阅读 · 0 评论 -
[Ubuntu]配置go命令永久生效
vim ~/.bashrc在最后面添加export PATH=$PATH:/usr/local/go/binsource ~/.bashrc原创 2022-07-01 14:28:20 · 426 阅读 · 0 评论 -
[Ubuntu]安装telnet
apt install telnet原创 2022-07-01 11:11:05 · 696 阅读 · 0 评论 -
[Ubuntu]安装ifconfig
apt install net-tools原创 2022-04-15 21:54:15 · 3952 阅读 · 0 评论 -
[Ubuntu]安装vim
apt-get install vim原创 2022-07-01 10:38:14 · 326 阅读 · 0 评论 -
[Ubuntu]vim中文乱码
vim /etc/vim/vimrc最后加一句set encoding=utf8原创 2022-04-27 11:54:55 · 991 阅读 · 0 评论 -
[Linux]grep匹配反斜杠
匹配一个反斜杠:cat 13.log | grep "\\\\"原创 2022-04-14 11:26:52 · 679 阅读 · 0 评论 -
[Docker]部分Linux命令使用异常
1、问题重现例如:输入“↑”命令,显示乱码2、问题排查查看当前Shell,如下图所示,发现并不是/bin/bash查看/bin/sh,发现并没有软链到/bin/bash3、解决办法第一种:输入bash命令,切换到/bin/bashShell第二种:关闭dash,输入dpkg-reconfigure dash,选择no...原创 2021-09-12 17:57:07 · 853 阅读 · 0 评论 -
[Linux]tar: Exiting with failure status due to previous errors
检查你的命令(目录名等)是否正确原创 2021-12-05 10:16:20 · 554 阅读 · 0 评论 -
[Linux]解压tar.xz压缩包
tar xvJf ffmpeg-4.1.tar.xz原创 2020-06-16 15:15:13 · 233 阅读 · 0 评论 -
[Linux]vim替换文本
1、将所有old_string替换成new_string:%s/old_string/new_string/g原创 2019-09-26 19:16:02 · 226 阅读 · 0 评论 -
[Linux]使用FTP下载文件
wget ftp://127.0.0.1:21/* --ftp-user=user --ftp-password=123456 -r原创 2019-01-24 10:53:19 · 1127 阅读 · 0 评论 -
[Linux]rsync错误password file must not be other-accessible
1、问题:password file must not be other-accessible2、解决方法将password-file设置为600权限chmod 600 XXX.pass原创 2019-01-02 10:04:41 · 12508 阅读 · 3 评论 -
[Linux]screen命令使用
原创 2018-05-24 17:36:44 · 230 阅读 · 0 评论 -
[Linux]cp命令的一个坑
cp操作还没结束的时候,目标文件已经生成了,所以如果你的程序是对目标文件进行一些处理的话,一定要考虑目标文件的完整性,我建议使用mv. ...原创 2018-06-04 16:11:23 · 2640 阅读 · 0 评论 -
[Linux]rz命令失败原因分析
与用户权限有关原创 2018-05-07 16:05:43 · 8498 阅读 · 0 评论