Shell编程学习进度

6/8上午

chmod [auog][+-=][rwx] file

chmod -R [XXX] file    //R表示递归 recursion


chown target_owner file

chgrp target_owner file


umask与chmod功能相反 默认数值为0022

umask 0002 //valid before close the shell


软链接

 ln -s  source_path    target_path

作用:多路径、多用户可访问唯一源数据,便于数据的维护


suid和guid

why:

赋予非拥有该文件用户某种权限,但是不与

区别:

suid 是文件具有与owner相同的权限

guid使文件具有与该文件所在的group的用户相同的权限

使用:

chmod [XXXX] file

在保证go具有x权限时可使用

chmod u+s u+g file


6/8下午

find path -name -type -mtime -atime -ctime -prune -group -nogroup   atime= access time mtime = modified time ctime = create time

find -newer file ! oldfile  时间介于file和oldfile之间的文件

find -size 10000c 10M 字节

find -size 10000 5000M 块


find + exec XXXX  {} \;

find + ok XXXX {} \;


xargs 的意义:获取find匹配的一部分文件,而不是全部文件,进行执行。避免了exec的命令长度受限和exec多线程执行导致的系统功能下降。

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值