shell 第五章 操作文件和目录

本章命令:

  • cp – Copy files and directories 复制文件和目录
  • mv – Move/rename files and directories 移动/重命名文件和目录
  • mkdir – Create directories 创建目录
  • rm – Remove files and directories 删除文件和目录
  • ln – Create hard and symbolic links 创建硬链接和符号链接

通配符

Table 5-1: Wildcards

Wildcard Meaning
* 匹配任意多个字符(包括零个或一个)
? 匹配任意一个字符(不包括零个)
[characters] 匹配任意一个属于字符集中的字符
[!characters] 匹配任意一个不是字符集中的字符
[[:class:]] 匹配任意一个属于指定字符类中的字符

表5-2: 普遍使用的字符类

字符类 意义
[:alnum:] 匹配任意一个字母或数字
[:alpha:] 匹配任意一个字母
[:digit:] 匹配任意一个数字
[:lower:] 匹配任意一个小写字母
[:upper:] 匹配任意一个大写字母

Table 5-3: Wildcard Examples

Pattern Matches
* All files
g* All file beginning with “g”
b*.txt Any file beginning with “b” followed by any characters and ending
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值