Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://comet.sai.msu.ru/UNIXhelp/concepts/regexp1.1.html
Дата изменения: Fri Jan 17 12:43:14 1997 Дата индексирования: Tue Oct 2 02:01:22 2012 Кодировка: Поисковые слова: m 45 |
To list all files with a particular extension:
ls *.fm
This will list all the files in the current directory that have the extension .fm.
To remove a range of files:
rm prog.?
This removes all the files in the current directory with a single character extension to their name. Files foo.c and foo.o would be removed as would file foo.3.
To copy all the files containing the same pattern:
cp [pP]art[0-9] ../book
This copies all files whose name contains a pattern that starts with either p or P followed by the letters art and ending in any number from 0 through to 9.
So the file part1 would be copied to the parent directory book as would the file Part7.