»
 

Go Back   ResellerRatings Store Ratings > ResellerRatings Forums > Tech Support

Reply
 
LinkBack Thread Tools Display Modes
Old 11-25-2003, 10:54 AM   #1 (permalink)
Registered User
 
S.D.Willie's Avatar
 
Join Date: Oct 2001
Location: Ranger Country
Posts: 2,308
S.D.Willie is on a distinguished road
Kids cant copy filename over

simple question i feel i should know. i have a few music videos i want to copy over from my secondary drive. i can mount the drive, see what i need, but in this case one particular file is named " Saving Private Ryan.mpeg" w/out the quotes. notice the spaces in between the 3 words.

if i try to copy it with the command line i think since there are no spaces in the name i keep getting a syntax error about not being able to find it. i also cant rename it as well. i tried underscores too. any idea? tia

S.D.Willie is offline   Reply With Quote
Old 11-25-2003, 12:03 PM   #2 (permalink)
Registered User
 
CMonster's Avatar
 
Join Date: Oct 2001
Location: Sunny, smogy Southern California
Posts: 5,350
CMonster is on a distinguished road
for file by file you can add a \ just before the space, see the following example:

This will not work:

$cp /mnt/windows/My Documents/A MOST INCREDIBLE CHAIN OF EVENTS.doc ~/

This will work:

$cp /mnt/windows/My\ Documents/A\ MOST\ INCREDIBLE\ CHAIN\ OF\ EVENTS.doc ~/

Now if you wanted to do the whole My Documents directory this comamnd will work and get all the subdirectories and files that have spaces in the names:


cp -ax /mnt/windows/My\ Documents ~/

\ tells the shell to recognize the following special character -in this case a space

~/ is an abreviation for your home directory, in this case it will put the copied files in ~/ (your home dir)



I'm sure there is an edit for the bash profile or something that can handle spaces automatically because I do not see this problem with all my Linux installs, but I am too lazy to research it just now ... I got turkey to smoke

Last edited by CMonster; 11-25-2003 at 12:09 PM.
CMonster is offline   Reply With Quote
Old 11-25-2003, 03:45 PM   #3 (permalink)
Registered User
 
S.D.Willie's Avatar
 
Join Date: Oct 2001
Location: Ranger Country
Posts: 2,308
S.D.Willie is on a distinguished road
wow, thats tricky and took me a few times to get right. i was getting the stuff from my secondary linux drive with a hosed version of drake.

cp /mnt/hdb6/br/videos/Saving\ Private\ Ryan.mpeg /home/br/Documents

did the trick. now i see i need to hit the man pages of chmod and what not. thanks CMonster.

btw, have fun smoking your turkey. i hope you have those special extra big rolling papers.
S.D.Willie is offline   Reply With Quote
Old 11-26-2003, 02:35 AM   #4 (permalink)
Registered User
 
CMonster's Avatar
 
Join Date: Oct 2001
Location: Sunny, smogy Southern California
Posts: 5,350
CMonster is on a distinguished road
Quote:
i hope you have those special extra big rolling papers.

Hahahahahahahha!
CMonster is offline   Reply With Quote
Reply




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Most Active Discussions

Recent Discussions

All times are GMT -6. The time now is 03:17 AM.