Find the answer to your Linux question:
Results 1 to 3 of 3
Hi, I am using the Bash shell, but it seems to be set up such that 'ls' does not show the trailing slashes for directories automatically. Many times I've tried ...
  1. #1
    Just Joined!
    Join Date
    Apr 2008
    Posts
    2

    Get 'ls' to show directory slashes

    Hi,

    I am using the Bash shell, but it seems to be set up such that 'ls' does not show the trailing slashes for directories automatically.

    Many times I've tried cd'ing into something that isn't a directory because I can't tell the difference between files and directories with the basic 'ls' output.

    Is there a way to get ls to show the trailing slashes automatically?

    Thanks!

  2. #2
    Linux Guru
    Join Date
    Nov 2007
    Location
    Córdoba (Spain)
    Posts
    1,513
    ls -F

    You can put an alias on your ~/.bashrc or ~/.bash_profile if you want, like this:

    Code:
    ls='ls -F'

  3. #3
    Just Joined!
    Join Date
    Apr 2008
    Posts
    2

    Thanks

    Thanks, that's great I'll try that!

    Cheers!

Posting Permissions

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