LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 03-13-2004, 01:39 PM   #1
flamesrock
Member
 
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?

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

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
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 ...


Cheers,
Tink
 
Old 03-13-2004, 01:49 PM   #3
coolamit78
Member
 
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

OR

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.

Regards,

amit
 
Old 03-13-2004, 01:49 PM   #4
flamesrock
Member
 
Registered: Aug 2003
Distribution: Gentoo 2006.1
Posts: 405

Original Poster
Rep: Reputation: 30
Thankyou!!
 
  


Reply


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 10:40 PM
using rsync - one of the folders in path has spaces??? jgruss Linux - Networking 10 07-07-2004 07:27 PM
Way to many spaces LuderForChrist Linux - Newbie 4 06-25-2004 02:29 PM
Copying complete folders cipher_arg Linux - General 2 12-17-2002 05:53 PM
spaces WindowsDefector Linux - Newbie 2 05-23-2002 02:03 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:50 PM.

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