随笔分类 -  linux shell

上一页 1 ··· 42 43 44 45 46 47 48 49 50 ··· 77 下一页
摘要:1、问题vim编辑没有颜色 2、解决方法 [root@localhost test]# rpm -q vim-enhanced package vim-enhanced is not installed [root@localhost test]# yum install vim-enhanced. 阅读全文
posted @ 2022-05-05 22:15 小鲨鱼2018 阅读(431) 评论(0) 推荐(0)
摘要:问题 1、linux中vim backspace无法向左删除 2、解决方法 [root@localhost test]# echo "set backspace=2" >> ~/.vimrc ## 修改配置文件 3、测试 没有问题。 阅读全文
posted @ 2022-05-05 21:39 小鲨鱼2018 阅读(422) 评论(0) 推荐(0)
摘要:1、问题 vim 8.2 右键无法粘贴, 进入VISUAL 2、解决方法 [root@localhost ~]# find / -name "defaults.vim" /home/software/vim-8.2.1862/runtime/defaults.vim /usr/share/vim/s 阅读全文
posted @ 2022-05-05 20:59 小鲨鱼2018 阅读(1081) 评论(0) 推荐(0)
摘要:1、系统 [root@localhost test]# lsb_release -a LSB Version: :core-4.1-amd64:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-noarch:desktop-4.1-amd64:desktop-4.1-noa 阅读全文
posted @ 2022-05-05 20:35 小鲨鱼2018 阅读(418) 评论(0) 推荐(0)
摘要:1、测试数据 root@PC1:/home/test2# ls test.txt root@PC1:/home/test2# cat test.txt attatgcccagggtttgttacttcagatgtgtccagagtttctcccttct ggcaggttcatggtcttgctcac 阅读全文
posted @ 2022-05-05 17:19 小鲨鱼2018 阅读(840) 评论(0) 推荐(0)
摘要:1、系统 [root@centos7pc1 vim-8.2.1862]# hostnamectl Static hostname: centos7pc1 Icon name: computer-vm Chassis: vm Machine ID: d44b8799f26a411a87bb728b10 阅读全文
posted @ 2022-05-05 15:19 小鲨鱼2018 阅读(436) 评论(0) 推荐(0)
摘要:001、if [root@centos7pc1 test]# ls test.sh [root@centos7pc1 test]# cat test.sh ## 测试脚本,if判断 #!/bin/bash read -p "please input an num:" NUM if [ $NUM -g 阅读全文
posted @ 2022-05-05 11:43 小鲨鱼2018 阅读(95) 评论(0) 推荐(0)
摘要:方法1: 1、查看ip [root@centos7pc1 test]# ifconfig | head ens32: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.65.153 netmask 255.255.255 阅读全文
posted @ 2022-05-05 11:18 小鲨鱼2018 阅读(571) 评论(0) 推荐(0)
摘要:1、系统 [root@centos7pc1 test]# lsb_release -a LSB Version: :core-4.1-amd64:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-noarch:desktop-4.1-amd64:desktop-4.1-no 阅读全文
posted @ 2022-05-05 10:57 小鲨鱼2018 阅读(768) 评论(0) 推荐(0)
摘要:测试文件 root@PC1:/home/test2# touch file.txt root@PC1:/home/test2# mkdir data root@PC1:/home/test2# ls data file.txt root@PC1:/home/test2# ll -h total 12 阅读全文
posted @ 2022-05-05 09:54 小鲨鱼2018 阅读(809) 评论(0) 推荐(0)
摘要:linux中printf命令用于格式化输出。 示例 001、 liujiaxin01@PC1:~/test2$ printf "姓名:%s\n身高:%dcm\n体重:%.2fkg\n" "小明" "180" "75.5" 姓名:小明 ## %s表示格式化为字符串strings; %d表示格式化为整数 阅读全文
posted @ 2022-05-04 11:11 小鲨鱼2018 阅读(623) 评论(0) 推荐(0)
摘要:1、 root@PC1:/home/test2# cat a.txt 1 2 3 4 5 root@PC1:/home/test2# awk '{printf("%s%\n", $1)}' a.txt awk: run time error: not enough arguments passed 阅读全文
posted @ 2022-05-04 10:00 小鲨鱼2018 阅读(558) 评论(0) 推荐(0)
摘要:001、 root@PC1:/home/test2# pwd ## 一个正常的linux命令 /home/test2 root@PC1:/home/test2# pwd; echo "xxx" ##;前执行正常,后面的命令能够正常执行 /home/test2 xxx root@PC1:/home/t 阅读全文
posted @ 2022-05-04 08:26 小鲨鱼2018 阅读(2164) 评论(0) 推荐(0)
摘要:linux中sleep命令用于将当前动作延迟一段时间: 001、示例: root@PC1:/home/test2# date ## date命令显示当前日期 2022年 05月 04日 星期三 08:10:15 CST root@PC1:/home/test2# date && sleep 10 & 阅读全文
posted @ 2022-05-04 08:12 小鲨鱼2018 阅读(660) 评论(0) 推荐(0)
摘要:SECONDS变量用于记录从当前shell开始运行所流逝的秒数。 示例: root@PC1:/home/test# echo $SECONDS 1178 root@PC1:/home/test#echo $SECONDS && sleep 10 && echo $SECONDS 1204 1214 阅读全文
posted @ 2022-05-04 00:14 小鲨鱼2018 阅读(174) 评论(0) 推荐(0)
摘要:1、查看系统 [root@centos7pc1 test]# cat /etc/redhat-release CentOS Linux release 7.9.2009 (Core) [root@centos7pc1 test]# hostnamectl Static hostname: cento 阅读全文
posted @ 2022-05-02 19:38 小鲨鱼2018 阅读(3661) 评论(0) 推荐(0)
摘要:1、-O , 指定下载文件的名称 示例: [root@centos7pc1 test]# ls [root@centos7pc1 test]# wget -O xxx.zip https://s3.amazonaws.com/plink1-assets/plink_linux_x86_64_2022 阅读全文
posted @ 2022-05-02 19:11 小鲨鱼2018 阅读(597) 评论(0) 推荐(0)
摘要:1、系统 root@liujiaxinpc1:/home/test# lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 20.04.4 LTS Release: 20.04 阅读全文
posted @ 2022-05-02 02:18 小鲨鱼2018 阅读(1953) 评论(0) 推荐(0)
摘要:1、查看系统及代码 root@liujiaxinpc1:/home# lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 20.04.4 LTS Release: 20.04 阅读全文
posted @ 2022-05-02 01:15 小鲨鱼2018 阅读(3533) 评论(0) 推荐(0)
摘要:来源:https://blog.csdn.net/bigdog_1027/article/details/78924768 Ubuntu安装后默认的官方源是美国的服务器,但是美国服务器在国内安装软件等会有较大的限制。所以我们需要将默认的源切换为国内源。一般来说,常用的国内源有阿里源(这是中国官方源) 阅读全文
posted @ 2022-05-02 00:37 小鲨鱼2018 阅读(5832) 评论(0) 推荐(0)

上一页 1 ··· 42 43 44 45 46 47 48 49 50 ··· 77 下一页