原创 腳本:
1、順序執行2、循環執行3、選擇執行計算文件單詞數; [root@node4~]#sed -r "s/[,=;'']/ /" fstab |awk '{for (i=1; i<=NF; i++)word[$i]++}END{for (i
原创 vim
vim +10 /etc/passwd vim +/pattern vim -d f1 f2 比較多個文件 命令模式 --> 插入模式 i: insert, 在光標所在處輸入 I:在當前光標所在行的行首輸入 a: append, 在光
原创 系統啓動和內核管理 --centos5/centos6
1、查看kernel版本:rpm -qa kernel [root@centos6 ~]# rpm -qa kernel kernel-2.6.32-696.el6.x86_642、linux :kernel +rootfs ker
原创 centos 6.9 ntp/ntpdate
1、 國家授時ntp服務器 ntp.ntsc.ac.cn 114.118.7.1632、yum install ntp [root@centos6 yum.repos.d]# rpm -qa |grep ntp fontpackages-
原创 linux 基礎操作
1、圖形界面直接root 賬號登錄:cd /etc/gdm/[root@centos7 gdm]# grep -Ev '^#|^$' custom.conf [daemon] AutomaticLoginEnable=ture A
原创 文本處理工具
1、grep2、正則表達式3、擴展正則表達式4、vim###########################cat -Acat -nscat -btacless : pgup; pgdown? n/N/openssl rand -base6
原创 centos7.5忘記root 密碼,單用戶修改密碼
1、進入centos菜單 #快速按上下箭頭2、e 進入編輯菜單, 此處添加:init=/bin/sh3、ctrl +x to start 4、掛載根目錄:mount -o remount ,rw / ;單用戶 / 目錄是隻讀的; 需要增加r
原创 centos 6 修改網卡名
1、dmesg |grep -i ethethtool -i eth1[root@centos6 ~]# dmesg |grep -i eth e1000 0000:02:01.0: eth0: (PCI:66MHz:32-bit) 00:
原创 centos 網卡重啓/防火牆/selinux/hosts-dns
1、centos6網卡重啓:service network restartcentos7網卡重啓:systemctl restart network[root@centos7 ~]# systemctl restart network
原创 io 重定向
文件描述符:[root@centos7 ~]#cp /etc/hosts /data [root@centos7 ~]#ll /proc/$$/fd total 0 lrwx------ 1 root root 64 Feb 6 09:2
原创 tomcat
tomacat : Apache Tomcat最早是由Sun Microsystems開發的一個Servlet容器,在1999年被捐獻給ASF(Apache Software Foundation),隸屬於Jakarta項目,現在已經獨立爲
原创 tomcat
tomacat : Apache Tomcat最早是由Sun Microsystems開發的一個Servlet容器,在1999年被捐獻給ASF(Apache Software Foundation),隸屬於Jakarta項目,現在已經獨立爲
原创 自己第一階段筆記
第二天重點bash-4.1$ :修改配置文件 .bashrc 刪除.bashrc ,添加就好了[root@centos /home/basher]#ls -a. .bash_logout .bashrc .mozilla..
原创 第二週Linux重點內容
第4天3A認證 授權 審計authentication authorization accouting aduition root :管理員Linux 組: groupname gid 管理員組 root other Lin
原创 第四周磁盤分區
第四周:track :磁道:1024chsc:柱面:255h:磁頭 255s:扇區 :63 (512字節)[root@Centos7/app]#echo 512631024*255 /1024/1024|bc8422686720 =8GLB