Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I do a ls -al the timestamp display is Month date time - would like it to be yy/mm/dd or just know WHERE to modify this?

I also cannot edit dconf-editor. - that shows %l:%M %p when I try to change it it just reverts back. I used sudo to launch.

Desktop shows time only

Nautilus shows weekday day month year time.

share|improve this question

In the end of your ~/.bashrc, paste the code below:

RAW_CUR_LS_ALIAS=`alias ls || echo "ls"`
CUR_LS_ALIAS=`echo "$RAW_CUR_LS_ALIAS" | sed "s/^alias ls='\|'$//g"`
alias ls="$CUR_LS_ALIAS --time-style='+%y/%m/%d %T'"

After pasting this command, save and close the file.

And run

source ~/.bashrc

Now try:

ls -al

You'll need source only this time, when you restart all of your gnome-terminal windows, it will always load the alias automatically.

If you want to customize it by yourself just take a look at the man of date and look for FORMAT options.

share|improve this answer
Be careful about overriding the existing ls alias defined in the default .bashrc. If you just append this new declaration you'll lose the prior's text coloring. – ændrük May 2 '13 at 1:00
Updated the answer to keep settings found in previous defined alias for ls – Onilton Maciel May 2 '13 at 2:25

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.