Training, Open Source computer languages
PerlPHPPythonMySQLApache / TomcatTclRubyJavaC and C++LinuxCSS 
Search for:
Home Accessibility Courses Diary The Mouth Forum Resources Site Map About Us Contact
recusive SCP including .htaccess

Posted by petegraham (petegraham), 2 November 2005
I currently use the current command to copy/backup my website:

scp -r user@remoteserver:/remote/dir/of/files/* /local/tager/dir/

However this fails to copy my .htaccess file so I have to scp this separately. Is there a way to recusively copy the whole site including files that being with "."?

Posted by admin (Graham Ellis), 6 November 2005
I'm not sure which shell you're using, but on some shells you can use curly braces to pick up hidden (dot) files.   Thus:

Code:
$ ls -1 {*,.??*}
.htaccess
WHC.css
ac.html
accommodation.tab
ic.jpg
il.jpg
index.html
ir.jpg
robots.txt
stay.html
$


versus

Code:
$ ls -1 *
WHC.css
ac.html
accommodation.tab
ic.jpg
il.jpg
index.html
ir.jpg
robots.txt
stay.html





This page is a thread posted to the opentalk forum at www.opentalk.org.uk and archived here for reference. To jump to the archive index please follow this link.

You can Add a comment or ranking to this page

© WELL HOUSE CONSULTANTS LTD., 2012: Well House Manor • 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 01144 1225 708225 • FAX: 01144 1225 899360 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho