Move All Files to Another Folder Except a Specific One in Bash

40 views Asked by At

I am using this command line to move files except "files2feed.php" from a folder to another one. It works in terminal but not in my bash script.

mv /media/site/public_html/ftp/category1/!(files2feed.php) /media/mysite/public_html/ftp/in/

I also tried:

mv /media/site/public_html/ftp/category1/\!(files2feed.php) /media/mysite/public_html/ftp/in/

What should I change for a bash script usage?

0

There are 0 answers