12 Nov 2009 @ 9:15 PM 

In Windows (and if you go a bit further back, DOS), we normally use the “dir” command to show us a list of files in a directory. Linux/Unix uses the “ls” command to do this.

“ls” isnt very pretty and doesnt show us much.

Personally, my preferred “ls” command is

ls --color=auto -al

although this is a huge hassle to type out every time.

But there is a trick.

cd ~
pico .bashrc

go all the way to the bottom and add this

alias ls='ls --color=auto -al'

ctrl-x to exit; “y” to save changes, and restart your terminal session.

Next time you run “ls” it will give you a nicely formatted directory listing show all files (including hidden)

Posted By: Zayin
Last Edit: 15 Nov 2009 @ 11:42 AM

EmailPermalink
Tags
Tags: , ,
Categories: shell


 

Responses to this post » (None)

 
Post a Comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.


 Last 50 Posts
 Back
Change Theme...
  • Users » 1
  • Posts/Pages » 38
  • Comments » 61
Change Theme...
  • VoidVoid « Default
  • LifeLife
  • EarthEarth
  • WindWind
  • WaterWater
  • FireFire
  • LightLight

Links



    No Child Pages.

Portfolio



    No Child Pages.