Linux 命令总结

学习链接 点击打开链接

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

1. 文件管理

        chmod 

           修改文件权限  chmod [who] operator [permission] filename

           chmod  u或g或o或a  +或-  w或r或x  filename

           chmod   777  filename     (4=读,2=写,1=执行)

           例如:  

                  chmod g+w myfile  rw- rw- r- -   赋予同组用户写权限

         chown

         更改文件属主  chown owner file

                   chmod  -R -h   zhangsan  test.log

                  - R选项意味着对所有子目录下的文件也都进行同样的操作。 - h选项意味着在改变符号链
接文件的属主时不影响该链接所指向的目标文件。

           chgrp

         更改文件权限组   chgrp owner file

                 chgrp zhangsan test.log

            id

           查询当前用户或组

            ln

           硬链接: ln file1 newfile          相当于指针

           软连接: ln -s file1 newfile      不同inode

         find

                文件名称查找  -name
               find ~ -name "*.txt" -print         在Home目录及子目录中查找所有的‘ * . t x t’文件
               find . -name  "*.txt" -print         在当前目录及子目录中查找所有的‘ * . t x t’文件
               find . -name "[A-Z]*" -print      当前目录及子目录中查找文件名以一个大写字母开头的文件
                文件权限查找 -perm
               find . -perm 755 -print 
                执行命令
               find . -type f -exec ls -l {} \;
              find . -type f -print | xargs file    
              find / -type f -print | xargs grep "device"

           重定向命令

           command > filename               把标准输出重定向到一个新文件中
           command >> filename             把标准输出重定向到一个文件中(追加)
          command 1 > fielname            把标准输出重定向到一个文件中
           command > filename 2>&1     把标准输出和标准错误一起重定向到一个文件中
           command 2 > filename            把标准错误重定向到一个文件中
           command 2 >> filename          把标准输出重定向到一个文件中(追加)
           command >> filename 2>&1  把标准输出和标准错误一起重定向到一个文件中 (追加)
           command < filename >filename2
                 把c o m m a n d命令以f i l e n a m e文件作为标准输入,以 f i l e n a m e 2文件作为标准输出
           command < filename
                 把c o m m a n d命令以f i l e n a m e文件作为标准输入
           command << delimiter
                 把从标准输入中读入,直至遇到d e l i m i t e r分界符
           command <&m
                把文件描述符m作为标准输入
           command >&m
                 把标准输出重定向到文件描述符m中
           command <&-
                 把关闭标准输入

           

2. 磁盘管理


3. 文档编辑


4. 文件传输


5. 磁盘维护


6.网络通信


7.系统管理


8.系统设置


9.备份压缩


10设备管理


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值