bash - copy multiple files with certain prefixs -
bash - copy multiple files with certain prefixs -
how re-create files with prefixs e.g. lte*.html, voicemail*.html
$ ls 2g_3g_cccccc.html other_dddd.html other3_dddd.html voicemail_bbbbbb.html lte_aaaa.html other2_dddd.html subdir1 i have tried no joy
$ cp '(lte*|voice*).html' subdir1/ cp: cannot stat `(lte*|voice*).html': no such file or directory so result want
$ ls subdir1/ voicemail_bbbbbb.html lte_aaaa.html
use brace expansion
cp {lte,voice}*.html subdir1/ which expands to
cp lte*.html voice*.html subdir1/ bash cp
Comments
Post a Comment