Results 1 to 4 of 4
I have some file, I want copy to another data. But i don't kown.
Exp: i have files abc.def1.wav, abc.def2.wav,..., abc.def3-in.wav, abc.def3-out.wav,..., on /monitor
I want wirte script move 2 ...
- 11-02-2008 #1Just Joined!
- Join Date
- Nov 2008
- Posts
- 3
Script to copy files
I have some file, I want copy to another data. But i don't kown.
Exp: i have files abc.def1.wav, abc.def2.wav,..., abc.def3-in.wav, abc.def3-out.wav,..., on /monitor
I want wirte script move 2 file abc.def1.wav and abs.def2.wav to /data/wav/ , but keep file abc.def3-in.wav and abc.def3-out.wav.
Please help me,
- 11-02-2008 #2
I thought manual copy should be the best solution since it's only 2 files....
- 11-02-2008 #3Just Joined!
- Join Date
- Nov 2008
- Posts
- 3
Thank reply, but not only 2 file on my server. When I copy by hand about 1000 file
. I want write scrip auto copy all file i need.
- 11-02-2008 #4Linux User
- Join Date
- Jun 2007
- Posts
- 318
You need to learn how to use globs in pathname expansion. In your example the following command would work:
The '?' means match any single character. Refer to bash manpage, pathname expansion, Pattern Matching for more information.Code:# mv /monitor/abc.def?.wav /data/wav/


Reply With Quote