LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 12-06-2009, 12:14 AM   #1
Fliggerty
LQ Newbie
 
Registered: Dec 2009
Posts: 6

Rep: Reputation: 0
Removing / from the end of directory with ls


Hello all,

My web host has recently upgrading from a custom Sphera VPS system to a cPanel environment. Among many other things, one aspect I don't like is the display of the directories when I list it. It shows something like this:

./
../
.bash_history
.bash_logout
bin/
etc/

The directory names are colored blue (which is fine, changing coloring isn't a problem) but the / is white. Overall it looks kind of disorganized and sloppy to me.

I can't determine how to change that. What type of .bashrc entry would I make to change that particular bit of display?

TIA!

--Fligg
 
Old 12-06-2009, 12:28 AM   #2
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
There is a section of ~/.bashrc which deals with the ls command, mine looks like this:

Code:
# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
    test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
    alias ls='ls --color=auto'
    #alias dir='dir --color=auto'
    #alias vdir='vdir --color=auto'

    alias grep='grep --color=auto'
    alias fgrep='fgrep --color=auto'
    alias egrep='egrep --color=auto'
fi
yours probably has -F --classify or --file-type in the first alias line, with color off.
 
Old 12-06-2009, 10:05 PM   #3
Fliggerty
LQ Newbie
 
Registered: Dec 2009
Posts: 6

Original Poster
Rep: Reputation: 0
Perfect, thanks for the response. You pointed me down the right path.

Because this is a cPanel environment, I cannot modify /etc/bashrc (before they upgraded it was a sort of VPS, so I had access to nearly everything.) I found this in that file:

Code:
LS_OPTIONS='--color=tty -F -a -b -T 0';
export LS_OPTIONS;
alias ls='/bin/ls $LS_OPTIONS';
alias dir='/bin/ls $LS_OPTIONS --format=vertical';
alias vdir='/bin/ls $LS_OPTIONS --format=long';
alias d=dir;
alias v=vdir;
eval `dircolors -b`
I copied it to my .bashrc and removed the -F. It works perfectly now. Thank you.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Removing File and Directory Paris Heng Linux - Newbie 5 02-20-2008 06:19 AM
removing a directory swatward Linux - Newbie 5 05-19-2005 08:22 AM
How to rsynce the actual directory path instead of just the directory at the end of Niceman2005 Linux - General 5 04-08-2005 07:58 PM
Removing a directory snowmonkey Linux - Software 3 11-06-2003 08:43 AM
Removing a directory WorldBuilder Linux - General 2 03-29-2003 07:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:58 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
Open Source Consulting | Domain Registration