Rename multiple folder

L

laurentv

Guest
I try to rename multiple folder :
/var/www/html/site1/mailing/ >> /var/www/html/site1/_mailing/
/var/www/html/site2/mailing/ >> /var/www/html/site1/_mailing/

Help :)
 


mv /var/www/html/site1/mailing/ /var/www/html/site1/_mailing/
mv /var/www/html/site2/mailing/ /var/www/html/site1/_mailing/

if needed run as root or use sudo
 
in fact I get a list of directory after a find command, and I want to rename these folders automatically
 
I think this is going to be a little tricky but where you want to start looking is the command xargs and piping.

eg.

find <options> | xargs <some other stuff>
 

Members online


Top