- 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
- 大數(shù)據(jù)戰(zhàn)爭:人工智能時(shí)代不能不說的事
- 腦動(dòng)力:Linux指令速查效率手冊(cè)
- 錯(cuò)覺:AI 如何通過數(shù)據(jù)挖掘誤導(dǎo)我們
- 大數(shù)據(jù)時(shí)代的數(shù)據(jù)挖掘
- 數(shù)據(jù)運(yùn)營之路:掘金數(shù)據(jù)化時(shí)代
- 網(wǎng)絡(luò)組建與互聯(lián)
- Linux服務(wù)與安全管理
- 液壓機(jī)智能故障診斷方法集成技術(shù)
- Visual Studio 2010 (C#) Windows數(shù)據(jù)庫項(xiàng)目開發(fā)
- Practical AWS Networking
- Practical Network Automation
- 巧學(xué)活用Linux
- 暗戰(zhàn)強(qiáng)人:黑客及反黑客工具快速精通
- Ubuntu 9 Linux應(yīng)用基礎(chǔ)
- Hands-On Data Analysis with NumPy and pandas