摘要: shell脚本 注意事项: shell 开头必备 #!/bin/bash 命名-规则 变量名大写 局部变量小写 函数名小写 名字体现出实际作用 脚本1:获取简易IP地址 IP=`ifconfig enp0s3 |head -2|tail -1|awk '{print $2}'` ZW=`ifconf 阅读全文
posted @ 2022-11-09 19:27 ~内个臣呐~ 阅读(99) 评论(0) 推荐(1)
摘要: Linux 定时任务调度 定时执行Linux命令 个人任务调度 $crontab -e 第一次输入后会让你选择编译器,在Ubuntu系统中nano 编译器是比较好用的,然后会打开一个文件 更改配置文件格式 前面有5个站位符后面是需要执行的命令 例 */1 * * * * ls />> /home/n 阅读全文
posted @ 2022-11-09 07:42 ~内个臣呐~ 阅读(203) 评论(0) 推荐(0)
摘要: linux|编写一个shell脚本 编写第一个shell $vim hello.sh #!/bin/bash echo"hello world" $chmod 777 hello.sh $./hello.sh Shell变量 系统变量 用户自定义变量 定义shell变量 变量不可用数字开头 等号两侧 阅读全文
posted @ 2022-11-09 07:42 ~内个臣呐~ 阅读(415) 评论(0) 推荐(0)
摘要: Linux进程管理 linux中每一个运行中的程序叫做进程,每个运行中的进程都会分配一个ID号 大多系统进程运行在后台,常驻在系统中直到关机才会结束 查看Linux的系统进程 ps $ps $ps -ef $ps -aux newland@newland-VirtualBox:~$ ps -aux 阅读全文
posted @ 2022-11-09 07:42 ~内个臣呐~ 阅读(35) 评论(0) 推荐(0)