- Ubuntu 20.04 Essentials
- Neil Smyth
- 148字
- 2021-06-11 17:39:42
9.7 Filename Shorthand
Many shell commands take one or more filenames as arguments. For example, to display the content of a text file named list.txt, the cat command would be used as follows:
$ cat list.txt
Similarly, the content of multiple text files could be displayed by specifying all the file names as arguments:
$ cat list.txt list2.txt list3.txt list4.txt
Instead of typing in each name, pattern matching can be used to specify all files with names matching certain criteria. For example, the ‘*’ wildcard character can be used to simplify the above example:
$ cat *.txt
The above command will display the content of all files ending with a .txt extension. This could be further restricted to any file names beginning with list and ending in .txt:
$ cat list*.txt
Single character matches may be specified using the ‘?’ character:
$ cat list?.txt
- Hands-On Graph Analytics with Neo4j
- 人工免疫算法改進(jìn)及其應(yīng)用
- Hadoop 2.x Administration Cookbook
- Hands-On Machine Learning with TensorFlow.js
- JBoss ESB Beginner’s Guide
- PostgreSQL Administration Essentials
- AutoCAD 2012中文版繪圖設(shè)計(jì)高手速成
- 運(yùn)動(dòng)控制器與交流伺服系統(tǒng)的調(diào)試和應(yīng)用
- 運(yùn)動(dòng)控制系統(tǒng)
- 在實(shí)戰(zhàn)中成長(zhǎng):C++開發(fā)之路
- Artificial Intelligence By Example
- 簡(jiǎn)明學(xué)中文版Photoshop
- 重估:人工智能與賦能社會(huì)
- 數(shù)據(jù)要素:全球經(jīng)濟(jì)社會(huì)發(fā)展的新動(dòng)力
- FANUC工業(yè)機(jī)器人配置與編程技術(shù)