Hi Justin,

If you want to use mv commands from the terminal to move
multiple files at once, you should look into the syntax of 
regular expressions.

For example,  mv file0[1-9].txt  new_folder

will move file01.txt, file02.txt, file03.txt,  etc into new_folder

mv [a,n]*mp3  new_folder2

will move any file whose name begins with "a" or "n" (lower case) and
ends in mp3 to new_folder2

mv file?.txt new_folder3

will move any folder with a  name beginning with "file" followed by a
single character of any type (alphabetic, number, symbol) and then
a .txt extention to new_folder3

You should probably practice with commands like "ls" which will
only list results, and not move them.

Maybe someone can suggest a good web page from a linux or
unix source that demostrates metacharacters and search ranges
for regular expressions matching file names?

Cheers,

Esther

On Mar 07, 2008, at 12:19PM, Justin Harford wrote:
>Hi all
>
>Saw this thread and I had a question of my own.
>
>I generally use the mv command in terminal to move stuff around but I  
>have wanted to be able to move multiple files at once.  Does anyone  
>know if there is a syntax that you can use to indicate multiple files  
>for an action like mv or cp?  Perhaps a , between the paths, or  
>something?
>
>Regards
>Justin Harford
 

Reply via email to