A piggy bank of commands, fixes, succinct reviews, some mini articles and technical opinions from a (mostly) Perl developer.

Jump to

Quick reference

Showing posts with label ls. Show all posts
Showing posts with label ls. Show all posts

How to really loop over filenames with spaces in

 Don't parse the output of "ls".

Instead:

for file in *

do

  ...

done


(source)

How to change the colours of directories and files

To change the colour of directories from dark blue to light blue (cyan):

    export LS_COLORS=$(echo $LS_COLORS|sed 's/di=01;34/di=01;36/')

See also

    man dircolors

and

    dircolors --print-database



...for a list of the colours.