LinuxQuestions.org
Help answer threads with 0 replies.
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-07-2017, 12:52 PM   #1
Can-ned Food
LQ Newbie
 
Registered: Apr 2015
Distribution: GNU→TT
Posts: 7

Rep: Reputation: Disabled
Toggling the Symbolic Link mode so as to edit symlinks


It is often useful for me to have situations like this:
.pool/
reticle1 -> /some/where/something
category1/
thing -> /some/where/something
category2/
thing -> /some/where/something
where making multiple symlinks is not optimal not even if they were directed to the pool's data.

If I wanted to edit the target in my pool/ directory and not need to recreate every other reference to that node via find $root -samefile or some text table used by a script, I need some tool which allows me to toggle the mode between 0o0120000 and 0o0100000.

Preferably this tool would be an extension of chmod, but limitations on the mode_t octal value might require a kernel patch.

If you know of any tool or kernel module that can do this, I thank you in advance for posting that here.
 
Old 03-07-2017, 02:14 PM   #2
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 9,233
Blog Entries: 4

Rep: Reputation: 3260Reputation: 3260Reputation: 3260Reputation: 3260Reputation: 3260Reputation: 3260Reputation: 3260Reputation: 3260Reputation: 3260Reputation: 3260Reputation: 3260
Can you use a hard link here? Another directory-entry referencing the same inode?
 
Old 03-07-2017, 03:01 PM   #3
ntubski
Senior Member
 
Registered: Nov 2005
Distribution: Debian, Arch
Posts: 3,604

Rep: Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946
Quote:
Originally Posted by Can-ned Food View Post
I need some tool which allows me to toggle the mode between 0o0120000 and 0o0100000.
This is kind of nonsensical. What would you expect to happen to a file when you "toggle" it like that?

Quote:
Originally Posted by sundialsvcs View Post
Can you use a hard link here? Another directory-entry referencing the same inode?
I don't think that would help the OP "edit the target in my pool/ directory" and have other links be updated as well. Hmm, unless you could use hard links of symlinks?
 
Old 03-07-2017, 05:04 PM   #4
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 4,555

Rep: Reputation: 2088Reputation: 2088Reputation: 2088Reputation: 2088Reputation: 2088Reputation: 2088Reputation: 2088Reputation: 2088Reputation: 2088Reputation: 2088Reputation: 2088
Sure, you can have hard links to symlinks, but only within a filesystem of course. Also, there is no way to change the symlink without breaking the hard links, so that's not going to be useful.

Perhaps using 2 levels of symlinks will work.
Code:
    .pool/reticle1 -> /some/where/something

    category1/thing -> /path/to/.pool/reticle1

    category2/thing -> /path/to/.pool/reticle1
Now, changing that link in .pool will affect the final target for all the others.
 
1 members found this post helpful.
  


Reply

Tags
chmod, symbolic link


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
Antergos Icons Change after toggling GNOMEs Accessibility high contrast mode remo907 Linux - Newbie 3 10-24-2015 01:57 AM
[SOLVED] Can I make a symbolic link that is dynamic link->$HOME/file? croog Linux - General 4 10-14-2012 07:55 PM
How to create symbolic link to html file and avoid page link problem? haxpor Linux - General 2 01-29-2008 07:40 AM
Apache 2.2 on FC5 and symbolic links/symlinks pdevr99 Linux - Security 5 04-05-2007 03:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:08 PM.

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