cancel
Showing results for 
Search instead for 
Did you mean: 

Date - file or folder

 
Manuales
Super Advisor

Date - file or folder

Hi,how can i change "Aug 14 15:22" as 200908141422 when i use "ls -lrt" ?

drwxrwxrwx 29 MONITOR users 1024 Aug 14 15:22 INTERFACES

thanks in advance.
4 REPLIES
Raj D.
Honored Contributor

Re: Date - file or folder

Manuales ,
You can use the touch command to change the date and timestamp of a file ,

Example:
# touch YYMMDDhhmm filename
See details for the date/time format
# man touch


Cheers,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "
Raj D.
Honored Contributor

Re: Date - file or folder

Manuals,

check this out :

https://forums13.itrc.hp.com/service/forums/questionanswer.do?admit=109447627+1250831195296+28353475&threadId=1335942

hth,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "
Steven Schweda
Honored Contributor

Re: Date - file or folder

> check this out :
> [...]

When citing a Forum page, it's helpful to
change "forumsXX.itrc" to "forums.itrc",
and to omit the whole "admit=xxx+yyy+zzz&"
string. (Leave "threadId=vvv". See below
for an example.)

> You can use the touch command [...]

How does that change the format of "ls -l"
output?

A Forum search for keywords like, say:
ls date format
would find many better suggestions,
including, for example:

http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1363837

Someday, you should consider trying a search
before you ask. It's just a thought.
Dennis Handly
Acclaimed Contributor

Re: Date - file or directory

>Steven: would find many better suggestions, including, for example:

(You're too quick for me. ;-)

The ls.cat format in question would be:
12 %Y%m%d%H%M

$ NLSPATH=$PWD/%N.cat ll -d .
drwxrwxr-x 2 uuu ggg 24576 200908202330 ./