LinuxQuestions.org
Register a domain and help support LQ
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 04-03-2006, 02:36 PM   #1
vbsaltydog
Member
 
Registered: Nov 2005
Distribution: CentOS
Posts: 141

Rep: Reputation: 15
symlinks from folders to folders?


Is there a way to create a symlink (or any other method) that points an empty folder in one location to a folder somewhere else on the same file system?
Basically, a symlink, only from folder to folder vs. file to target.


Thanks to all.
 
Old 04-03-2006, 02:43 PM   #2
uselpa
Senior Member
 
Registered: Oct 2004
Location: Luxemburg
Distribution: Slackware, OS X
Posts: 1,507

Rep: Reputation: 46
I cannot see the difference between the 2 cases you mention:

Code:
pu@slackw:~/temp$ mkdir folder1
pu@slackw:~/temp$ v
total 0
drwxr-xr-x  2 pu pu 48 2006-04-03 20:41 folder1/
pu@slackw:~/temp$ ln -s folder1 folder2
pu@slackw:~/temp$ cd folder1
pu@slackw:~/temp/folder1$ touch afile
pu@slackw:~/temp/folder1$ cd ..
pu@slackw:~/temp$ v folder2/*
-rw-r--r--  1 pu pu 0 2006-04-03 20:41 folder2/afile
 
Old 04-03-2006, 02:43 PM   #3
Wells
Member
 
Registered: Nov 2004
Location: Florida, USA
Distribution: Debian, Redhat
Posts: 383

Rep: Reputation: 31
Sure. Just use ln -s <destination folder> <name of symlink>
 
Old 04-03-2006, 02:48 PM   #4
vbsaltydog
Member
 
Registered: Nov 2005
Distribution: CentOS
Posts: 141

Original Poster
Rep: Reputation: 15
Thanks to you both. I did not realize it would work for folders. I thought the symlink would appear as a file that points to a folder. It worked great!

Thanks for the fast response.
 
Old 04-03-2006, 02:51 PM   #5
pljvaldez
Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Squeeze (x86)
Posts: 6,092

Rep: Reputation: 269Reputation: 269Reputation: 269
In linux, everything is a file, including hardware and directories.
 
  


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
Samba can create new files and folders but access denied in any new folders k.king Linux - Networking 2 01-15-2006 07:14 AM
folders qerf Linux - Newbie 1 11-19-2005 10:20 PM
What are those folders? Ephracis LQ Suggestions & Feedback 2 02-25-2005 09:34 AM
So many folders merchtemeagle Linux - Newbie 4 10-07-2004 09:23 AM
what are those folders in a / jpkeisala Linux - Newbie 6 04-18-2004 02:16 PM


All times are GMT -5. The time now is 03:55 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