Re: how to copy filename with spaces using scp
From: John Davidorff Pell (johnpell_at_mac.com)
Date: 01/14/04
- Previous message: Dave Markham: "Re: Port forwarding and PC listening question"
- In reply to: Joe Smith: "Re: how to copy filename with spaces using scp"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Tue, 13 Jan 2004 21:14:50 -0800
On Jan 13, 2004, at 4:01 PM, Joe Smith wrote:
> On Thu, Dec 11, 2003 at 09:23:37PM -0500, Jerry Geis wrote:
>> I am wondering how I would issue a command using scp
>> to copy a file that has spaces in the filename.
> I tend to use rsync over ssh for stuff like that.
>
> host-a% rsync -av -e ssh source_dir/ user@host-b:dest_dir/
>
> Rsync handles filenames with spaces, directorynames with spaces,
> and does not re-copy files that have already been transfered
> to the destination. It also works great for log files, by
> transferring new appended data instead of copying the whole file.
> -Joe
This issue has been repeatedly argued over on many lists. The gist is:
if you want to use scp, then u need to "double excape" the file name,
i.e. scp "file name with spaces.txt" remote:"new\ file\ name.txt"
hope this helps,
JP
-- "The New York Times is read by the people who run the country. The Washington Post is read by the people who think they run the country. The National Enquirer is read by the people who think Elvis is alive and running the country ..." -- Robert J Woodhead
- application/pkcs7-signature attachment: smime.p7s
- Previous message: Dave Markham: "Re: Port forwarding and PC listening question"
- In reply to: Joe Smith: "Re: how to copy filename with spaces using scp"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|