LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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, 02: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, 02:48 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,004
Blog Entries: 11

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903
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, 02: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, 02: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 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


All times are GMT -5. The time now is 09:32 AM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration