LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-01-2012, 03:57 PM   #1
nakko
Member
 
Registered: Oct 2004
Location: Austin, TX
Distribution: Ubuntu Dapper Drake
Posts: 39

Rep: Reputation: 15
Fix the way "ls -a" lists / sorts output?


I am not sure when this first started happening, but at some point, when you type "ls -a", the dot files (.e.g. ".bashrc") are no longer displayed at the beginning of the list. The "ls" command now seems to ignore a leading dot when sorting by filename.

How do I make ls go back to the old behavior, properly alphabetizing leading dots instead of ignoring them?

I'm sure this is convenient to some people, and this question is not directed at you if that's the case. =)
 
Old 05-01-2012, 04:48 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
What's your locale, when did you change it?! =o)

Try
LANG=C ls -la
 
Old 05-01-2012, 05:10 PM   #3
nakko
Member
 
Registered: Oct 2004
Location: Austin, TX
Distribution: Ubuntu Dapper Drake
Posts: 39

Original Poster
Rep: Reputation: 15
You've got to be kidding; this is locale based? Mine has been set to "en_US.UTF-8" for forever. Is there no way to have it set to that and have dot files at the top? =(
 
Old 05-01-2012, 06:12 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Quote:
Originally Posted by nakko View Post
You've got to be kidding; this is locale based? Mine has been set to "en_US.UTF-8" for forever. Is there no way to have it set to that and have dot files at the top? =(
Not kidding; you could just alias ls
alias ls='LC_COLLATE=C ls'


should be sufficient.
 
Old 05-01-2012, 06:20 PM   #5
nakko
Member
 
Registered: Oct 2004
Location: Austin, TX
Distribution: Ubuntu Dapper Drake
Posts: 39

Original Poster
Rep: Reputation: 15
Hm. Neat! Thanks!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
HOW TO FIX ""The requested URL /phpMyAdmin was not found on this server."" amritpalpathak Linux - Software 20 11-06-2012 01:23 AM
square brackets in output of "ps aux" not matching output of "ps -ejH" alirezan1 Linux - Newbie 14 07-14-2010 04:17 AM
"failed to execute child process" "Input/output error" fl.bratu Fedora 4 12-15-2008 04:03 AM
Feeding the output of "diff" or "cat" command to dpkg --purge kushalkoolwal Debian 9 06-19-2008 07:27 AM
/media lists "cdrom" and "cdrom1" jerrybasham MEPIS 4 04-17-2007 04:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:31 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration