随笔分类 -  linux shell

上一页 1 ··· 55 56 57 58 59 60 61 62 63 ··· 77 下一页
摘要:1、脚本只有10行,报第11行错误?? [root@centos79 test]# bash test.sh test.sh: line 11: syntax error: unexpected end of file [root@centos79 test]# cat -n test.sh 1 # 阅读全文
posted @ 2021-10-31 12:20 小鲨鱼2018 阅读(512) 评论(0) 推荐(0)
摘要:1、echo liujiaxin01@PC1:~/test$ ls a.txt liujiaxin01@PC1:~/test$ cat a.txt 01 02 03 04 05 06 07 08 09 10 liujiaxin01@PC1:~/test$ echo "" >> a.txt liuji 阅读全文
posted @ 2021-10-29 11:23 小鲨鱼2018 阅读(1924) 评论(0) 推荐(1)
摘要:列转行 1、paste liujiaxin01@PC1:~/test$ seq -f %02g 10 01 02 03 04 05 06 07 08 09 10 liujiaxin01@PC1:~/test$ seq -f %02g 10 > a.txt liujiaxin01@PC1:~/test 阅读全文
posted @ 2021-10-29 11:18 小鲨鱼2018 阅读(5641) 评论(0) 推荐(0)
摘要:1、单列测试 root@PC1:/home/test2# seq 5 > a.txt root@PC1:/home/test2# cat a.txt 1 2 3 4 5 root@PC1:/home/test2# paste -s a.txt 1 2 3 4 5 root@PC1:/home/tes 阅读全文
posted @ 2021-10-27 07:36 小鲨鱼2018 阅读(201) 评论(0) 推荐(0)
摘要:1、测试数据 root@PC1:/home/test/test/test# cat a.txt 1 d f 2 3 f 3 s 8 4 f a d g 8 root@PC1:/home/test/test/test# cat -A a.txt 1 d f$ $ 2 3 f$ 3 s 8$ $ $ 4 阅读全文
posted @ 2021-10-25 21:33 小鲨鱼2018 阅读(314) 评论(0) 推荐(0)
摘要:1、问题 2、解决方法,增加如下内容 root@PC1:~/home/test# vim /etc/profileexport DISPLAY=:0.0 3、立即生效 root@PC1:/home/test# source /etc/profile 参考:https://blog.csdn.net/ 阅读全文
posted @ 2021-10-24 17:58 小鲨鱼2018 阅读(11859) 评论(0) 推荐(0)
摘要:linux中comm命令用于提取两列数据中的唯一项、交集、并集等。 1、测试数据 root@PC1:/home/test/test# ls a.txt b.txt root@PC1:/home/test/test# cat a.txt w s g d w a root@PC1:/home/test/ 阅读全文
posted @ 2021-10-24 12:16 小鲨鱼2018 阅读(456) 评论(0) 推荐(0)
摘要:1、查看内核 root@PC1:~/GS/lihua/test# hostnamectl Static hostname: PC1 Icon name: computer-vm Chassis: vm Machine ID: dc50d4dc469c45ea8a2a10f39caa45e9 Boot 阅读全文
posted @ 2021-10-23 18:51 小鲨鱼2018 阅读(2478) 评论(0) 推荐(0)
摘要:1、问题 Package libxml-2.0 was not found in the pkg-config search path 2、检查是否有库文件, no root@PC1:/home/software# find / -name "libxml-2.0.pc" root@PC1:/hom 阅读全文
posted @ 2021-10-23 15:19 小鲨鱼2018 阅读(1204) 评论(0) 推荐(0)
摘要:1、问题 2、检查相关变量、目录 root@PC1:/test# locate libcurl.pc root@PC1:/test# echo PKG_CONFIG_PATH PKG_CONFIG_PATH root@PC1:/test# ls /usr/lib/pkgconfig/ ibus-ta 阅读全文
posted @ 2021-10-23 14:57 小鲨鱼2018 阅读(1531) 评论(0) 推荐(0)
摘要:1、问题, 命名是目录,却无法通过颜色识别 2、解决方法 root@PC1:/test# vim /etc/profile 在配置文件末尾添加ls命令别名,保存退出 3、使用source命令使其立即生效 root@PC1:/test# source /etc/profile 4、测试效果 阅读全文
posted @ 2021-10-23 11:44 小鲨鱼2018 阅读(331) 评论(0) 推荐(0)
摘要:1、问题 ll: command not found 2、解决方法 root@PC1:/etc# vim /etc/profile 在最下面增加命令别名, 然后保存退出。 3、重新加载profle文件 root@PC1:/etc# source /etc/profile 4、测试效果 root@PC 阅读全文
posted @ 2021-10-23 11:32 小鲨鱼2018 阅读(1700) 评论(0) 推荐(0)
摘要:1、内核版本 root@ubuntu02:~# hostnamectl Static hostname: ubuntu02 Icon name: computer-vm Chassis: vm Machine ID: 3c186d21e7094b71a8889a2d78350c4b Boot ID: 阅读全文
posted @ 2021-10-21 20:38 小鲨鱼2018 阅读(349) 评论(0) 推荐(0)
摘要:1、查看系统位数、系统内核 root@ubuntu02:/home# getconf LONG_BIT 64 root@ubuntu02:/home# hostnamectl Static hostname: ubuntu02 Icon name: computer-vm Chassis: vm M 阅读全文
posted @ 2021-10-21 20:07 小鲨鱼2018 阅读(1935) 评论(0) 推荐(0)
摘要:1、 getconf LONG_BIT root@ubuntu02:/home# getconf LONG_BIT 64 阅读全文
posted @ 2021-10-21 19:16 小鲨鱼2018 阅读(86) 评论(0) 推荐(0)
摘要:1、问题,root无法在图形界面登录 2、解决方法 step1、 vim /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf 增加一行:greeter-show-manual-login=true, 然后保存退出 step2、 vim /root/.pr 阅读全文
posted @ 2021-10-10 22:51 小鲨鱼2018 阅读(397) 评论(0) 推荐(0)
摘要:1、问题 2、解决方法 step1、 vim /etc/ssh/sshd_config step2、 service ssh restart 3、测试效果 阅读全文
posted @ 2021-10-10 22:33 小鲨鱼2018 阅读(158) 评论(0) 推荐(0)
摘要:1、问题 2、解决方法 step1、 apt install openssh-server 。。。。。。 step2、 apt install openssh-client step3、 ps -e | grep sshd 3、测试效果 阅读全文
posted @ 2021-10-10 22:20 小鲨鱼2018 阅读(116) 评论(0) 推荐(0)
摘要:step1、 apt autoremove open-vm-tools step2、 apt install open-vm-tools-desktop 。。。。。。 step3、重启 reboot 阅读全文
posted @ 2021-10-10 22:06 小鲨鱼2018 阅读(772) 评论(0) 推荐(0)
摘要:1、问题:E: Unable to locate package 2、解决方法 。。。。。。 3、测试效果 阅读全文
posted @ 2021-10-10 21:59 小鲨鱼2018 阅读(769) 评论(0) 推荐(0)

上一页 1 ··· 55 56 57 58 59 60 61 62 63 ··· 77 下一页