LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   a bash file executing only "ls -l" doesn't produce colorful listing (https://www.linuxquestions.org/questions/linux-general-1/a-bash-file-executing-only-ls-l-doesnt-produce-colorful-listing-471219/)

sirbijan 08-06-2006 02:47 AM

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

spirit receiver 08-06-2006 03:33 AM

There are no aliases available in the script. You'll have to use "ls -l --color" instead.

sycamorex 08-06-2006 06:19 AM

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.


All times are GMT -5. The time now is 04:16 AM.