Latest LQ Deal: Linux Power User Bundle
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 08-06-2006, 02:47 AM   #1
LQ Newbie
Registered: Nov 2005
Location: Iran
Distribution: FC5 & Ubuntu Dapper Drake
Posts: 9

Rep: Reputation: 0
a bash file executing only "ls -l" doesn't produce colorful listing

Hi ppl

for some reason I wanted to run execute "llll" in shell and get "ls -l". To do that I made a script in my home/bin folder. Something like this:

echo "ls -l" > llll
chmod +x llll
And now whenever I run "llll", I get a listing like "ls -l". The only difference is that my listing isn't colorful! I mean when I run "ls -l" directly, I get colorful directories and files, but running "llll" gives me the listing, in gray!

Do you know of any remedy?

Old 08-06-2006, 03:33 AM   #2
spirit receiver
Registered: May 2006
Location: Frankfurt, Germany
Distribution: SUSE 10.2
Posts: 424

Rep: Reputation: 33
There are no aliases available in the script. You'll have to use "ls -l --color" instead.
Old 08-06-2006, 06:19 AM   #3
LQ Veteran
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,825
Blog Entries: 1

Rep: Reputation: 1220Reputation: 1220Reputation: 1220Reputation: 1220Reputation: 1220Reputation: 1220Reputation: 1220Reputation: 1220Reputation: 1220
Make sure you haven't su'ed to any other user
if your account is 'john' and you will:

john$ su
root# ls -l
then all the files whose owner is john will be displayed in b&w.


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
bash script: using "select" to show multi-word options? (like "option 1"/"o zidane_tribal Programming 7 12-19-2015 01:03 AM
How to write a bash script to replace all "KH" to "K" in file ABC??? cqmyg5 Slackware 4 07-24-2007 09:00 AM
bash redirection "$ cat << EOF > file" (how does this work) ninmonkeys Linux - General 1 11-09-2004 03:37 PM
.kde/Autostart bash scripts "file not found" Nice-n-Slow Linux - Software 1 07-02-2004 05:25 PM
bash-2.05b# Xlib: extension "XFree86-DRI" missing on display ":0.0". citrus Linux - General 8 02-22-2004 10:43 AM > Forums > Linux Forums > Linux - General

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