Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 03-13-2004, 02:39 PM   #1
Registered: Aug 2003
Distribution: Gentoo 2006.1
Posts: 405

Rep: Reputation: 30
copying folders with spaces between?

Hi, I want to copy a file like

cp -R /mnt/cdrom/region folder /www/score/

via ssh. but since the name of the folder has spaces between it, it gives me errors and I can't copy. Whats the proper command?

Secondly, is it possible to transfer a file via ssh from a linux computer on my lan to my server? If so, what command would I type?

Old 03-13-2004, 02:48 PM   #2
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 927Reputation: 927Reputation: 927Reputation: 927Reputation: 927Reputation: 927Reputation: 927Reputation: 927
You can escape spaces with a \

Or you can put the "whole thing" in
speech-marks :)

As for the server: it it's a Linux machine
scp <file> <user>@<host>:<file>

man scp
for details ...

Old 03-13-2004, 02:49 PM   #3
Registered: Aug 2003
Location: New Delhi, India
Distribution: RHEL AS 3/4, Windows XP
Posts: 546

Rep: Reputation: 31
Well, you can use doublequotes to specify the complete filename

So try this for the first problem

cp -R /home/flamesrock/" this filename has spaces" /www/score


you can also use a backslash to escape the spaces like this

cp -R /home/flamesrock/ this\ filename\ has\ spaces /www/score/

Regarding the second problem, yes you can transfer a file from another computer in your lan to your linux server. But I think you will need to use NFS for that...I havent tried ssh so cant suggest you much about that one.


Old 03-13-2004, 02:49 PM   #4
Registered: Aug 2003
Distribution: Gentoo 2006.1
Posts: 405

Original Poster
Rep: Reputation: 30


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Open folders with spaces in the name via the CLI virtualme Linux - Newbie 3 02-08-2005 11:40 PM
using rsync - one of the folders in path has spaces??? jgruss Linux - Networking 10 07-07-2004 08:27 PM
Way to many spaces LuderForChrist Linux - Newbie 4 06-25-2004 03:29 PM
Copying complete folders cipher_arg Linux - General 2 12-17-2002 06:53 PM
spaces WindowsDefector Linux - Newbie 2 05-23-2002 03:03 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:37 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration