Shell中常用的通配符

1 Shell中常用的通配符

通配符共有3个: “*”,“?”,“[]”

  • * - 用于匹配文件名中任意长度的字符串;
  • ? - 只匹配一个字符;
  • [] - 用于匹配所有出现在方括号内的字符。可以使用短线- “-”来指定字符集范围。如:ls text[1-3] 或 ls test[a-z]或ls test[123]。

猜你喜欢

转载自blog.csdn.net/SlowIsFastLemon/article/details/106429247