LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-20-2015, 09:06 AM   #1
willc86
Member
 
Registered: Dec 2014
Posts: 56

Rep: Reputation: Disabled
creating a sym link in cygwin/linux so I can grep from the link?


Hey guys, not sure if this is even possible but what I am trying to do is create a link to my folder called "notes" it is located in /cygdrive/c/users/user001/notes

my cygwin standard path is /home/user001.

the command that I am doing to make a sym link to that folder is ln -s notes /home/user001

I see the sym link there notes --> notes

however, I can not directly CD into the link. Is this possible? or even grep into the link? So, while I am at my home directory, i see the sym link notes. so I would like to # grep -r [value] notes
 
Old 07-20-2015, 09:21 AM   #2
willc86
Member
 
Registered: Dec 2014
Posts: 56

Original Poster
Rep: Reputation: Disabled
Never mind =) i had to specify the entire path. I though being at the specified directory, it would pick up the actual link w/o it having to write the entire absolute path

so I actually had to do the entire comand

#ln -s /cygdrive/c/Users/user001/Desktop/notes /home/user001
#cd
#ls -l notes --> /cygdrive/c/Users/user001/Desktop/notes /home/user001
#cd notes

and it picks it up just fine!

Last edited by willc86; 07-20-2015 at 09:23 AM.
 
Old 07-20-2015, 10:02 AM   #3
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
Symbolic links will go exactly where you tell it, it won't try to parse out the location of the destination and modify it so it works from the source. If you give it a relative path, it needs to be a relative path from the final location of the symlink, not a relative path from your current directory.
 
  


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
About sym link directory satimis Linux - General 2 11-09-2012 08:06 AM
cannot create sym link kkpal Programming 3 11-28-2007 10:29 PM
Recursive sym link in aaa_base-12.0? Woodsman Slackware 6 07-08-2007 07:21 PM
Sym link disaepears after shut down/restart usr_wifi Linux - Software 0 02-13-2005 02:43 PM
Cannot get sym link from java to firefox to work Kelean Slackware 3 01-23-2005 05:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:28 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
Open Source Consulting | Domain Registration