Find the answer to your Linux question:
Results 1 to 3 of 3
I guess I'm used to windows "dir" command. I realize that I can type "ls -lh" to show file sizes and other useful info, but is there a way to ...
  1. #1
    Just Joined!
    Join Date
    Sep 2007
    Posts
    3

    Newb question about "ls"

    I guess I'm used to windows "dir" command. I realize that I can type "ls -lh" to show file sizes and other useful info, but is there a way to configure my system so I can just type "ls" and have it list everything that "ls -lh" lists? Its just a pain typing "ls -lh" everytime I want to list a directory.

    Thanks for any ideas!

  2. #2
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,316
    Hi !

    Set alias in ~/.bashrc file.
    Code:
    alias ls='ls -lh'
    Save file and execute source ~/.bashrc

    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  3. #3
    oz
    oz is offline
    forum.guy
    Join Date
    May 2004
    Location
    arch linux
    Posts
    18,095
    Also... be sure to check out man ls for lots of ls options available to you.
    oz

    new members/users: read this first | new member faq
    no private messages requesting computer support - post them on the forums!
    please use the "report post" button to alert our forum admins to problematic posts rather than responding to them yourself.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...