LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 08-06-2006, 02:47 AM   #1
sirbijan
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:

Code:
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?

cheers,
bijan
 
Old 08-06-2006, 03:33 AM   #2
spirit receiver
Member
 
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
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,544
Blog Entries: 1

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

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


Reply


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 6 03-21-2013 10:35 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


All times are GMT -5. The time now is 04:31 PM.

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