Google Answers Logo
View Question
 
Q: How to move multiple files at once in Solaris ( No Answer,   2 Comments )
Question  
Subject: How to move multiple files at once in Solaris
Category: Computers > Programming
Asked by: travis_apple-ga
List Price: $2.00
Posted: 25 Mar 2003 09:46 PST
Expires: 25 Mar 2003 10:24 PST
Question ID: 180755
Under Solaris UNIX I have a bunch of files in a directory with a
common prefix  that I wish to move into a subdirectory.  I don't want
to have to enter "mv file_one subdir/file_one" for each of the files
as this would be time consuming. What I'd like to do is something on
the command line that would move all the files I need to move into the
subdirectory in one line.  All the files have a similar prefix, so I
was hoping that would allow me to somehow do this easily without
moving files in the same directory that don't have this prefix. 
Thanks for your help.
Answer  
There is no answer at this time.

Comments  
Subject: Re: How to move multiple files at once in Solaris
From: denco-ga on 25 Mar 2003 09:57 PST
 
Using your format, the following should work:

mv file*.* subdir

If you need to write over some existing files, do a force:

mv -f file*.* subdir
Subject: Re: How to move multiple files at once in Solaris
From: eadfrith-ga on 25 Mar 2003 10:00 PST
 
I think this should work:

mv file_* subdir/

where file_ is the prefix.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy