Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - General
User Name
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.


  Search this Thread
Old 10-30-2006, 04:30 AM   #1
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, 04:41 AM   #2
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671
Is this what you are refering to, from "info coreutils"
File:, 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, 04:58 AM   #3
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, 05:40 AM   #4
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 05:48 AM.


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 03:06 AM
symbolic links neocontrol Linux - Software 3 05-15-2006 12:08 AM
help with symbolic links sopiaz57 Linux - General 2 06-11-2004 06:17 PM
Symbolic Links petercool Linux - General 2 08-20-2003 11:15 AM
Symbolic links bkmesenbrink Linux - Newbie 2 11-13-2002 11:54 AM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:48 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration