简体   繁体   中英

Find And Replace Folder Names On Server

I can't seem to find a way to do this on my dedicated server.

I've got a huge directory of folders and some of then contain 3 dashes like '---' which I need to find and replace with just one dash.

Is there an easy way to do a find and replace right on my server? I really don't want to have to download all the folders and do it on my desktop and re-upload them.

You could do something like this:

find  ./  -name '*'  -exec  rename  's/---/-/g'  {}  \;

* HAS NOT BEEN TESTED

src

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM