LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 07-10-2004, 06:31 AM   #1
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
Question bash, ls how to get rid of the '@' added to symlink


Hello,

I read the man for ls from the top to the bottom and from the bottom to the top but that gives me no help

When I ls a directory with symlink, I get :
Code:
$ ls /proc/ide
drivers  hda@ hdc@ hdd@ ide0/ ide1/ via
What I want is :
Code:
$ ls /proc/ide
drivers  hda  hdc  hdd  ide0  ide1  via
I seems simple but I can't find any references how to remove the extra '@' added for symlinks. Any help will be much appreciated
 
Old 07-10-2004, 10:47 AM   #2
wolfe2554
Member
 
Registered: Apr 2003
Location: denver co
Distribution: redhat9
Posts: 156

Rep: Reputation: 30
check out your /etc/profile.d/colorls.sh and also check your ~/.bashrc and ~/.bash_profile files each of these alter your ls command with allias commands. such as
allias ls = ls -l
this will make it so each time you type ls you get ls -l automaticaly.
what you are looking for in these files is -F or --classify or -p --file-type
any of these will cause ls to append @ at the symlnk
 
Old 07-10-2004, 12:23 PM   #3
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Original Poster
Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
Thank you but as I needed this for a time only, I fixed it by invoking a bash shell with no options from the terminal.
 
Old 07-17-2004, 12:37 PM   #4
Hko
Senior Member
 
Registered: Aug 2002
Location: Groningen, The Netherlands
Distribution: Debian
Posts: 2,536

Rep: Reputation: 111Reputation: 111
A nicer solution may be to disable the alias for the current shell with "unalias ls".
 
Old 07-21-2004, 04:36 AM   #5
Goala
Member
 
Registered: May 2004
Location: Merida (Spain)
Distribution: Debian
Posts: 89

Rep: Reputation: 15
ls is only a program, so if you want to override the ls alias function in only one instruction you can do:
Code:
/usr/bin/ls /proc/ide
that is to say, indicate explicitly the program you want to use. So you don't have to unalias ls. Another matter would be if you had to indicate this in a lot of code lines.

Bye.
 
  


Reply



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
Execute bash through a symlink? Agento- Linux - General 10 04-18-2005 01:51 PM
where is symlink? guitarfella Slackware 3 12-04-2004 07:34 AM
rm gets rid of file, but hardrive space doesn't get smaller (bash) r4nd0mz Linux - Software 2 05-02-2004 12:34 AM
symlink evannextel Linux - Newbie 1 09-17-2003 03:54 PM
How to get rid of quotes in bash? CodeWarrior Slackware 7 05-21-2003 09:02 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

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