Linux命令概况

1.硬件资源 10

 CPU  lscpu
 显卡  lspci | grep -i VGA
 内存 free
 硬盘 lsblk mount umount du  df
 网络 ping ifconfig  netstat traceroute host
 内核 uname  lsmod

2.用户和文件系统 30

 su  sudo  id  groups  useradd
 w  who whoami  last passwd  
 echo cat  less head tail 
 ls cd pwd  mkdir rmdir
 cp mv chmod touch ln
 tar zip  wget scp history 

3.路径和变量 10

 export  source  exec  fork bash
 $PATH  ../  ./  ~/  printenv

4.进程和服务 10

 ps pstree top kill jobs fg
 at crontab systemctl journalctl

5.编译和安装 5

 configure  make install 
 yum/apt  rpm/deb	  

6.搜索和帮助 10

 find which locate whereis  type 
 file grep
 man info  --help

7.符号和变量 5

 通配符 *
 管道符 |
 $普通用户     # root 权限
 .bashrc

8.其他

 wc  clear alias 
 vim 三种命令模式
 lshw lsscsi lspci lsof lsattr  
find ./ -maxdepth 1 -type d -name "TEST*"  | xargs -i zip -vr {}.zip {}
find ./ -maxdepth 1 -type d -name "*.jpeg" | xargs -i rename -v 's/.jpeg/.jpg/' {}
find ./ -maxdepth 1 -type d -name "TEST*"  | xargs -i rm -v {}.zip
 <()
   sort   <(find ./ -maxdepth 1 -type f -name "tt*.zip" |cut -d . -f1-2  )    <( find ./ -maxdepth 1 -type d -name "tt*"  )  |uniq -d   | xargs -i rm -v {}.zip

基本认知

 操作系统是“背景知识”,而算法与数据结构是高级别的“核心能力”
 (数论、算法思想、数据结构)
###查看-了解信息,确认信息
###动作

100个命令--ubuntu

 1.可以立即操作计算机--用命令的方式
2.背后涉及计算机的概念-基本了解-和数据结构和算法有关的给一个切入点
    60个基本的,30个进阶的,10个高阶的--掌握60个足够了(小学阶段)
3.了解参数
   参数方式 :Unix 风格  BSD  风格  GNU  风格  其他 
      -- 长选项 短选项  必选项  可选项   可组合 不可组合  不带-  带-个 带--个
	nano--交互式的文本编辑  

基本命令--30

  了解文件和目录
  ls  cd    pwd
  echo cat  tee 
  head  tail more 
了解计算机
   ssh lshw lscpu   
   df  du  free 
   ifconfig  ping   
动作:
    mkdir  rm  mv  cp 
查找:
    find  whereis  which 
	date     $LANG  time
	&  |  ..
    env >>  >	2>    .  

基本命令-数据结构和算法相关 20

  sort unqi     cut  
  tree  diff    wget
  ps    pstree top
  sudo chmod chown
  PATH  LIBRARY_PATH     LD_LIBRARY_PATH 
   while do  done  for  in elif

基本命令-10

   自学习-内部命令: help  man  info   gnome-terminal
   了解命令:  type  file   
   快捷键: ctrl + z  ctrl + c   ctrl + d	

进阶-30

 tar   timeout  nohup
 export source  |xargs
 kill killall  lspci
 systemctl   fork exec  
 lsb_release lsblk  grep 
 ping	scp   crontab
 vim   curl  mount  
 apt/yum   make install 
 gcc gbd git
 ld  ldd ldconfig

高阶-10个

 lsof  fuser chown  
 bg  jobs   docker
 
示例: 
 while read f_nm; do echo "$f_nm "; done  < /opt/test.txt
 cat /opt/test.txt | while read f_nm ;do echo "$f_nm "; done  
 for file_nm in `cat /opt/test.txt`  ;do echo $file_nm; done
 for file_nm in $(cat /opt/test.txt) ;do echo $file_nm; done	

其他

 	   paste     lsof -i:22   
    查看物理CPU个数
 cat /proc/cpuinfo| grep "physical id"| sort| uniq| wc -l	 
 数据组织方式:逻辑结构 物理结构

   逻辑结构: 直接前继 直接后继
   数据处理方式: 增删改查遍历

posted @ 2021-08-19 20:45  辰令  阅读(60)  评论(0)    收藏  举报