How do I copy all files with scp in 1 command?

Chris F.A. Johnson chris-E7bvbYbpR6jSUeElwK9/Pw at public.gmane.org
Thu May 16 00:23:40 UTC 2013


On Wed, 15 May 2013, Neil Watson wrote:

> On Wed, May 15, 2013 at 03:10:51PM -0400, waltdnes-SLHPyeZ9y/tg9hUCZPvPmw at public.gmane.org wrote:
>>  I'm mostly finished setting up a new desktop PC, after which an
>> ancient PC will go to the York Region ewaste centre.  One problem I ran
>> into whilst copying over files is that "dot-files", e.g. .bash_profile
>> and .bashrc are not copied over when I specify "*".  What I ended up
>> doing was...
>> 
>> scp * new_machine:/home/waltdnes/
>> scp \.* new_machine:/home/waltdnes/

   Include dot files in filename expansion with:

shopt -s dotglob

-- 
    Chris F.A. Johnson, <http://cfajohnson.com/>
    Author:
    Pro Bash Programming: Scripting the GNU/Linux Shell (2009, Apress)
    Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list