-E
--adjust-extension
If a file of type application/xhtml+xml or text/html is downloaded and the URL does not end with the regexp \.[Hh][Tt][Mm][Ll]?, this option will cause the suffix .html to be appended to the local filename. This is
useful, for instance, when you're mirroring a remote site that uses .asp pages, but you want the mirrored pages to be viewable on your stock Apache server. Another good use for this is when you're downloading CGI-
generated materials. A URL like site.com/article.cgi?25 will be saved as article.cgi?25.html.
Note that filenames changed in this way will be re-downloaded every time you re-mirror a site, because Wget can't tell that the local X.html file corresponds to remote URL X (since it doesn't yet know that the URL produces
output of type text/html or application/xhtml+xml.
As of version 1.12, Wget will also ensure that any downloaded files of type text/css end in the suffix .css, and the option was renamed from --html-extension, to better reflect its new behavior. The old option name is
still acceptable, but should now be considered deprecated.
At some point in the future, this option may well be expanded to include suffixes for other types of content, including content types that are not parsed by Wget.
-O file
--output-document=file
@[0-9a-zA-Z]{1,5}\)
)
@[0-9a-zA-Z]{1,5}"\)
")
#!/bin/bash
for i in `find . -depth -type d`
do
cd "${i}"
for j in *.*@*; do
IFS='@' read -r -a NAME <<< "${j}"
mv "${j}" "${NAME[0]}"
done
cd -
done