LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 10-30-2006, 05:30 AM   #1
sadarax
Member
 
Registered: Sep 2005
Distribution: Ubuntu
Posts: 249

Rep: Reputation: 30
Configure symbolic links to always append a slash


I have forgot what conf file I need to edit to make symbolic links always append a trailing slash when I am using them from command line. Can anyone help? I am using Ubuntu Dapper.
 
Old 10-30-2006, 05:41 AM   #2
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655
Is this what you are refering to, from "info coreutils"
Quote:
File: coreutils.info, Node: Trailing slashes, Next: Traversing symlinks, Prev: Target directory, Up: Common options

2.5 Trailing slashes
====================

Some GNU programs (at least `cp' and `mv') allow you to remove any
trailing slashes from each SOURCE argument before operating on it. The
`--strip-trailing-slashes' option enables this behavior.

This is useful when a SOURCE argument may have a trailing slash and
specify a symbolic link to a directory. This scenario is in fact rather
common because some shells can automatically append a trailing slash
when performing file name completion on such symbolic links. Without
this option, `mv', for example, (via the system's rename function) must
interpret a trailing slash as a request to dereference the symbolic link
and so must rename the indirectly referenced _directory_ and not the
symbolic link. Although it may seem surprising that such behavior be
the default, it is required by POSIX and is consistent with other parts
of that standard.
 
Old 10-30-2006, 05:58 AM   #3
sadarax
Member
 
Registered: Sep 2005
Distribution: Ubuntu
Posts: 249

Original Poster
Rep: Reputation: 30
The only real reason I want an appended slash is for the 'cd' command in consoles. I could swear I edited a conf file in /etc/ last time I did this.

Tnfo coreutils does not seem to have the information I want.
 
Old 10-30-2006, 06:40 AM   #4
Zerthis
LQ Newbie
 
Registered: Oct 2006
Distribution: Debian Etch
Posts: 11

Rep: Reputation: 0
Edit /etc/inputrc and add the following line:

set mark-symlinked-directories on

This will help you

Just in case: you have to restart your terminal in order for it to work.

Last edited by Zerthis; 10-30-2006 at 06:48 AM.
 
  


Reply

Tags
cd, end, inputrc, link, slash, symbolic


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
symbolic links durden2.0 Linux - Newbie 6 11-12-2008 04:06 AM
symbolic links neocontrol Linux - Software 3 05-15-2006 01:08 AM
help with symbolic links sopiaz57 Linux - General 2 06-11-2004 07:17 PM
Symbolic Links petercool Linux - General 2 08-20-2003 12:15 PM
Symbolic links bkmesenbrink Linux - Newbie 2 11-13-2002 12:54 PM


All times are GMT -5. The time now is 12:40 AM.

Main Menu
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