- 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
- 大數據管理系統
- 輕輕松松自動化測試
- Introduction to DevOps with Kubernetes
- 80x86/Pentium微型計算機原理及應用
- Photoshop CS3圖像處理融會貫通
- DevOps:Continuous Delivery,Integration,and Deployment with DevOps
- 格蠹匯編
- SMS 2003部署與操作深入指南
- Visual Studio 2010 (C#) Windows數據庫項目開發
- Mastering Text Mining with R
- PowerMill 2020五軸數控加工編程應用實例
- Drupal高手建站技術手冊
- MPC5554/5553微處理器揭秘
- 大數據素質讀本
- 基于Proteus的PIC單片機C語言程序設計與仿真