You are not logged in.

#1 2015-06-06 23:28:04

useraddition
Member
Registered: 2013-06-07
Posts: 107

Problem with underscores _ on symbolic links?

I tryed to add a symbolic link to my Windows folder I have Ntfs-3g properly installed. i remember a few years back there was never a problem with underscores for folder names. Here is my terminal output:

[krazybastid@krazy89345i753696 ~]$ ln -s /media/windows/Users/Rich's_Computer/Desktop/RadRich /home/krazybastid/Desktop/RadRich
> 

I get that stupid > sign. What happened to using the underscore do I need to add some software to the shell? Is it a /bin/bash thing or something else? Well if anybody knows why that happened please help. Thanks.

Offline

#2 2015-06-06 23:47:36

ayekat
Member
Registered: 2011-01-17
Posts: 1,590

Re: Problem with underscores _ on symbolic links?

This is not due to the underscore sign, but due to the apostrophe (the part .../Rich's_Computer/...), which starts a quoted string, and which must be closed - and if you don't, it just assumes the quoted string (and thus your command) continues, even after a new line. This is indicated by the > sign.
If you <tab> to autocomplete, it should automatically escape special characters (like double and single quotes, brackets, spaces, etc.) with backslashes.

Otherwise, just enclose the entire path in double quotes:

ln -s "/media/windows/Users/Rich's_Computer/Desktop/RadRich" /home/krazybastid/Desktop/RadRich

EDIT
This is probably better placed in the Programming & Scripting subforum.

Last edited by ayekat (2015-06-06 23:49:49)


pkgshackscfgblag

Offline

#3 2015-06-07 01:20:23

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: Problem with underscores _ on symbolic links?

Not a Sysadmin issue, moving to NC...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

Board footer

Powered by FluxBB